java.lang.Object
java.lang.Enum<Instruction>
io.github.thebusybiscuit.slimefun4.implementation.items.androids.Instruction
All Implemented Interfaces:
Serializable, Comparable<Instruction>, Constable

public enum Instruction extends Enum<Instruction>
This enum holds every Instruction for the ProgrammableAndroid added by Slimefun itself.
Author:
TheBusyBiscuit
  • Enum Constant Details

  • Field Details

    • valuesCache

      public static final Instruction[] valuesCache
  • Method Details

    • values

      public static Instruction[] 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 Instruction 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
    • getItem

      @Nonnull public org.bukkit.inventory.ItemStack getItem()
    • getRequiredType

      @Nonnull public AndroidType getRequiredType()
    • execute

      @ParametersAreNonnullByDefault public void execute(ProgrammableAndroid android, org.bukkit.block.Block b, UniversalMenu inventory, org.bukkit.block.BlockFace face)
    • getInstruction

      @Nullable public static Instruction getInstruction(@Nonnull String value)
      Get a value from the cache map rather than calling Enum.valueOf(Class, String). This is 25-40% quicker than the standard Enum.valueOf(Class, String) depending on your Java version. It also means that you can avoid an IllegalArgumentException which let's face it is always good.
      Parameters:
      value - The value which you would like to look up.
      Returns:
      The Instruction or null if it does not exist.