Interface FabricServerAudiences
- All Superinterfaces:
AudienceProvider,AutoCloseable,FabricAudiences
Provides
Audience instances for a specific server instance.- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder forFabricServerAudienceswith 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.static @NotNull FabricServerAudiences.Builderbuilder(@NotNull net.minecraft.server.MinecraftServer server) Create an audience provider for this server with customized settings.static @NotNull FabricServerAudiencesof(@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.fabric.FabricAudiences
flattener, renderer, toAdventure, toNative
-
Method Details
-
of
@NotNull static @NotNull FabricServerAudiences 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:
- 4.0.0
-
builder
static @NotNull FabricServerAudiences.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:
- 4.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:
- 4.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:
- 4.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:
- 4.0.0
-