Enum Class ExecutableBy

java.lang.Object
java.lang.Enum<ExecutableBy>
org.skriptlang.skript.bukkit.command.custom.ExecutableBy
All Implemented Interfaces:
Serializable, Comparable<ExecutableBy>, Constable

public enum ExecutableBy extends Enum<ExecutableBy>
Enum describing the types of CommandSenders that can execute this command.
  • Enum Constant Details

    • PLAYERS

      public static final ExecutableBy PLAYERS
      This command is only executable by players.
    • OPERATORS

      public static final ExecutableBy OPERATORS
      This command is only executable by operators.
    • CONSOLE

      public static final ExecutableBy CONSOLE
      This command is only executable by console.
    • BLOCKS

      public static final ExecutableBy BLOCKS
      This command is only executable by blocks (e.g, command blocks).
  • Method Details

    • values

      public static ExecutableBy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ExecutableBy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • predicate

      public Predicate<org.bukkit.command.CommandSender> predicate()
      Returns:
      A predicate to validate the behavior expected by this restriction.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<ExecutableBy>
    • isSuperSet

      public static boolean isSuperSet(Set<ExecutableBy> first, Set<ExecutableBy> second)
      Compares whether a set of ExecutableBys is a superset of another.
      Parameters:
      first - The first set.
      second - The second set.
      Returns:
      Whether the first set includes all CommandSenders covered by the second.