Interface MinecraftServerAudiences
- All Superinterfaces:
AudienceProvider
,AutoCloseable
,MinecraftAudiences
Provides
Audience
instances for a specific server instance.- Since:
- 6.0.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Builder forMinecraftServerAudiences
with custom attributes. -
Method Summary
Modifier and TypeMethodDescription@NotNull Audience
Create an audience that will send to every listed player.@NotNull Audience
audience
(@NotNull net.minecraft.commands.CommandSource source) Get an audience that will send to the providedCommandSource
.@NotNull AdventureCommandSourceStack
audience
(@NotNull net.minecraft.commands.CommandSourceStack source) Get an audience to send to aCommandSourceStack
.static @NotNull MinecraftServerAudiences.Builder
builder
(@NotNull net.minecraft.server.MinecraftServer server) Create an audience provider for this server with customized settings.static @NotNull MinecraftServerAudiences
of
(@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, world
Methods 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
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
-