Interface FabricServerAudiences

All Superinterfaces:
net.kyori.adventure.platform.AudienceProvider, AutoCloseable, FabricAudiences
All Known Implementing Classes:
FabricServerAudiencesImpl

public interface FabricServerAudiences extends net.kyori.adventure.platform.AudienceProvider, FabricAudiences
Provides Audience instances for a specific server instance.
Since:
4.0.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Builder for FabricServerAudiences with custom attributes.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull net.kyori.adventure.audience.Audience
    audience(@NotNull Iterable<net.minecraft.server.level.ServerPlayer> players)
    Create an audience that will send to every listed player.
    @NotNull net.kyori.adventure.audience.Audience
    audience(@NotNull net.minecraft.commands.CommandSource source)
    Get an audience that will send to the provided CommandSource.
    audience(@NotNull net.minecraft.commands.CommandSourceStack source)
    Get an audience to send to a CommandSourceStack.
    builder(@NotNull net.minecraft.server.MinecraftServer server)
    Create an audience provider for this server with customized settings.
    static @NotNull FabricServerAudiences
    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.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 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 net.kyori.adventure.audience.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 net.kyori.adventure.audience.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