Enum Class InputKey

java.lang.Object
java.lang.Enum<InputKey>
org.skriptlang.skript.bukkit.input.InputKey
All Implemented Interfaces:
Serializable, Comparable<InputKey>, Constable

public enum InputKey extends Enum<InputKey>
Enum representing different movement input keys.
See Also:
  • Input
  • Enum Constant Details

    • FORWARD

      public static final InputKey FORWARD
    • BACKWARD

      public static final InputKey BACKWARD
    • LEFT

      public static final InputKey LEFT
    • JUMP

      public static final InputKey JUMP
    • SNEAK

      public static final InputKey SNEAK
    • SPRINT

      public static final InputKey SPRINT
  • Method Details

    • values

      public static InputKey[] 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 InputKey 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
    • check

      public boolean check(org.bukkit.Input input)
      Checks if the given Input is pressing this InputKey.
      Parameters:
      input - the input to check
      Returns:
      true if the Input is pressing this InputKey, false otherwise
    • fromInput

      public static Set<InputKey> fromInput(org.bukkit.Input input)
      Returns a set of InputKeys that match the given Input.
      Parameters:
      input - the input to check
      Returns:
      a set of InputKeys that match the given Input