Enum Class AdvancementCommands.Action

java.lang.Object
java.lang.Enum<AdvancementCommands.Action>
net.minecraft.server.commands.AdvancementCommands.Action
All Implemented Interfaces:
Serializable, Comparable<AdvancementCommands.Action>, Constable
Enclosing class:
AdvancementCommands

static enum AdvancementCommands.Action extends Enum<AdvancementCommands.Action>
  • Enum Constant Details

  • Field Details

    • key

      private final String key
  • Constructor Details

    • Action

      private Action(String pKey)
  • Method Details

    • values

      public static AdvancementCommands.Action[] 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 AdvancementCommands.Action 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
    • perform

      public int perform(ServerPlayer pPlayer, Iterable<AdvancementHolder> pAdvancements)
      Applies this action to all the given advancements.
      Returns:
      The number of players affected.
    • perform

      protected abstract boolean perform(ServerPlayer pPlayer, AdvancementHolder pAdvancement)
    • performCriterion

      protected abstract boolean performCriterion(ServerPlayer pPlayer, AdvancementHolder pAdvancement, String pCriterionName)
    • getKey

      protected String getKey()