Enum Class NonLegacyMethod

java.lang.Object
java.lang.Enum<NonLegacyMethod>
org.sgrewritten.stargate.property.NonLegacyMethod
All Implemented Interfaces:
Serializable, Comparable<NonLegacyMethod>, Constable

public enum NonLegacyMethod extends Enum<NonLegacyMethod>
An enum containing various new features that might be available
  • Enum Constant Details

    • PUSH_X

      public static final NonLegacyMethod PUSH_X
      The powered minecart pushX method

      This was added to Paper to change a powered minecart's x-push

    • PUSH_Z

      public static final NonLegacyMethod PUSH_Z
      The powered minecart pushZ method

      This was added to Paper to change a powered minecart's z-push

    • GET_WORLD_MIN

      public static final NonLegacyMethod GET_WORLD_MIN
      The world get getMinHeight() method

      This was added as a cause of the cave update

    • GET_WORLD_MAX

      public static final NonLegacyMethod GET_WORLD_MAX
      The world get getMaxHeight() method

      This was added as a cause of the cave update

    • GET_FUEL

      public static final NonLegacyMethod GET_FUEL
      The powered minecart getFuel method

      This was added to Paper to change a powered minecart's z-push

  • Method Details

    • values

      public static NonLegacyMethod[] 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 NonLegacyMethod 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
    • isImplemented

      public boolean isImplemented()
      Checks whether this non-legacy method is available
      Returns:

      Whether this non-legacy method is available

    • invoke

      public Object invoke(Object object, Object... parameters)
      Invokes this non-legacy method
      Parameters:
      object -

      The object to invoke the method on

      parameters -

      The parameters required for the method

      Returns:

      The return value of the invocation