Interface MinecraftServerAudiences
- All Superinterfaces:
AudienceProvider,AutoCloseable,MinecraftAudiences
Provides
Audience instances for a specific server instance.- Since:
- 6.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder forMinecraftServerAudienceswith custom attributes. -
Method Summary
Modifier and TypeMethodDescription@NotNull AudienceCreate an audience that will send to every listed player.@NotNull Audienceaudience(@NotNull net.minecraft.commands.CommandSource source) Get an audience that will send to the providedCommandSource.@NotNull AdventureCommandSourceStackaudience(@NotNull net.minecraft.commands.CommandSourceStack source) Get an audience to send to aCommandSourceStack.@NotNull Audienceaudience(@NotNull net.minecraft.server.level.ServerPlayer source) Get an audience that will send to the providedServerPlayer.static @NotNull MinecraftServerAudiences.Builderbuilder(@NotNull net.minecraft.server.MinecraftServer server) Create an audience provider for this server with customized settings.static @NotNull MinecraftServerAudiencesof(@NotNull net.minecraft.server.MinecraftServer server) Get the shared audience provider for the server.Methods inherited from interface net.kyori.adventure.platform.AudienceProvider
all, close, console, flattener, permission, permission, player, players, server, worldMethods inherited from interface net.kyori.adventure.platform.modcommon.MinecraftAudiences
asAdventure, asAdventure, asComponentThrowable, asNative, flattener, nonWrappingSerializer, renderer, update
-
Method Details
-
of
@NotNull static @NotNull MinecraftServerAudiences of(@NotNull @NotNull net.minecraft.server.MinecraftServer server) Get the shared audience provider for the server.This provider will render messages using the global translation registry.
- Parameters:
server- server instance to work with- Returns:
- common audience provider
- Since:
- 6.0.0
-
builder
static @NotNull MinecraftServerAudiences.Builder builder(@NotNull @NotNull net.minecraft.server.MinecraftServer server) Create an audience provider for this server with customized settings.- Parameters:
server- the server- Returns:
- audience provider builder
- Since:
- 6.0.0
-
audience
@NotNull @NotNull AdventureCommandSourceStack audience(@NotNull @NotNull net.minecraft.commands.CommandSourceStack source) Get an audience to send to aCommandSourceStack.This will delegate to the native implementation by the command source, or otherwise use a wrapping implementation.
- Parameters:
source- source to send to.- Returns:
- the audience
- Since:
- 6.0.0
-
audience
@NotNull @NotNull Audience audience(@NotNull @NotNull net.minecraft.server.level.ServerPlayer source) Get an audience that will send to the providedServerPlayer.Depending on the specific source, the returned audience may only support a subset of abilities.
- Parameters:
source- source to send to- Returns:
- an audience for the source
- Since:
- 6.1.0
-
audience
Get an audience that will send to the providedCommandSource.Depending on the specific source, the returned audience may only support a subset of abilities.
- Parameters:
source- source to send to- Returns:
- an audience for the source
- Since:
- 6.0.0
-
audience
@NotNull @NotNull Audience audience(@NotNull @NotNull Iterable<net.minecraft.server.level.ServerPlayer> players) Create an audience that will send to every listed player.- Parameters:
players- Players to send to.- Returns:
- a new audience
- Since:
- 6.0.0
-