Interface FabricServerAudiences

All Superinterfaces:
AudienceProvider, AutoCloseable, FabricAudiences

public interface FabricServerAudiences extends AudienceProvider, FabricAudiences
Provides Audience instances for a specific server instance.
Since:
4.0.0
  • 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 a CommandSourceStack.

      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

      @NotNull @NotNull Audience audience(@NotNull @NotNull net.minecraft.commands.CommandSource source)
      Get an audience that will send to the provided CommandSource.

      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