Class Audiences


  • public final class Audiences
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  Audiences.Factory  
    • Constructor Summary

      Constructors 
      Constructor Description
      Audiences()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Optional<Audience> filtered​(Audience audience, java.util.function.Predicate<Audience> predicate)
      Filters an audience with given predicate.
      static Audience onlinePlayers()
      Gets an Audience that targets all online players.
      static Audience server()
      Gets an Audience that targets the entire server, including players and system, when available.
      static Audience system()
      Gets an Audience that targets the system, such as a server console.
      static Audience withPermission​(java.lang.String permission)
      Gets an Audience that targets all online players with the specified permission.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Audiences

        public Audiences()
    • Method Detail

      • server

        public static Audience server()
        Gets an Audience that targets the entire server, including players and system, when available.
        Returns:
        An audience
      • onlinePlayers

        public static Audience onlinePlayers()
        Gets an Audience that targets all online players.
        Returns:
        An audience
      • withPermission

        public static Audience withPermission​(java.lang.String permission)
        Gets an Audience that targets all online players with the specified permission.
        Parameters:
        permission - The permission
        Returns:
        An audience
      • system

        public static Audience system()
        Gets an Audience that targets the system, such as a server console.
        Returns:
        An audience