Interface BukkitAudiences

  • All Superinterfaces:
    net.kyori.adventure.platform.AudienceProvider, AutoCloseable

    public interface BukkitAudiences
    extends net.kyori.adventure.platform.AudienceProvider
    An audience provider for Bukkit.
    Since:
    4.0.0
    See Also:
    AudienceProvider
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      static @NotNull net.kyori.adventure.sound.Sound.Emitter asEmitter​(@NotNull org.bukkit.entity.Entity entity)
      Represent an entity as an emitter of sound.
      static @NotNull BukkitAudiences.Builder builder​(@NotNull org.bukkit.plugin.Plugin plugin)
      Creates an audience provider builder for a plugin.
      static @NotNull BukkitAudiences create​(@NotNull org.bukkit.plugin.Plugin plugin)
      Creates an audience provider for a plugin.
      @NotNull net.kyori.adventure.audience.Audience filter​(@NotNull Predicate<org.bukkit.command.CommandSender> filter)
      Creates an audience based on a filter.
      @NotNull net.kyori.adventure.audience.Audience player​(@NotNull org.bukkit.entity.Player player)
      Gets an audience for a player.
      @NotNull net.kyori.adventure.audience.Audience sender​(@NotNull org.bukkit.command.CommandSender sender)
      Gets an audience for a command sender.
      • Methods inherited from interface net.kyori.adventure.platform.AudienceProvider

        all, close, console, flattener, permission, permission, player, players, server, world
    • Method Detail

      • create

        @NotNull
        static @NotNull BukkitAudiences create​(@NotNull
                                               @NotNull org.bukkit.plugin.Plugin plugin)
        Creates an audience provider for a plugin.

        There will only be one provider for each plugin.

        Parameters:
        plugin - a plugin
        Returns:
        an audience provider
        Since:
        4.0.0
      • builder

        @NotNull
        static @NotNull BukkitAudiences.Builder builder​(@NotNull
                                                        @NotNull org.bukkit.plugin.Plugin plugin)
        Creates an audience provider builder for a plugin.

        There will only be one provider for each plugin.

        Parameters:
        plugin - a plugin
        Returns:
        an audience provider
        Since:
        4.0.0
      • asEmitter

        static @NotNull net.kyori.adventure.sound.Sound.Emitter asEmitter​(@NotNull
                                                                          @NotNull org.bukkit.entity.Entity entity)
        Represent an entity as an emitter of sound.
        Parameters:
        entity - the entity to represent
        Returns:
        an emitter
        Since:
        4.0.0
      • sender

        @NotNull
        @NotNull net.kyori.adventure.audience.Audience sender​(@NotNull
                                                              @NotNull org.bukkit.command.CommandSender sender)
        Gets an audience for a command sender.
        Parameters:
        sender - a command sender
        Returns:
        an audience
        Since:
        4.0.0
      • player

        @NotNull
        @NotNull net.kyori.adventure.audience.Audience player​(@NotNull
                                                              @NotNull org.bukkit.entity.Player player)
        Gets an audience for a player.
        Parameters:
        player - a player
        Returns:
        an audience
        Since:
        4.0.0
      • filter

        @NotNull
        @NotNull net.kyori.adventure.audience.Audience filter​(@NotNull
                                                              @NotNull Predicate<org.bukkit.command.CommandSender> filter)
        Creates an audience based on a filter.
        Parameters:
        filter - a filter
        Returns:
        an audience
        Since:
        4.0.0