java.lang.Object
com.pixelmonmod.pixelmon.battles.api.rules.clauses.BattleClause
com.pixelmonmod.pixelmon.battles.api.rules.clauses.type.ItemPreventClause
All Implemented Interfaces:
IEncodeable, Comparable<BattleClause>

public class ItemPreventClause extends BattleClause
Prevents certain held items from being used.
  • Constructor Details

    • ItemPreventClause

      public ItemPreventClause(String id, EnumHeldItems... heldItems)
      Creates a clause to ban specific held items.
      Parameters:
      id - The unique ID of the battle clause.
      heldItems - The banned held items.
  • Method Details

    • validateSingle

      public boolean validateSingle(Pokemon pokemon)
      Description copied from class: BattleClause
      Checks if the rule allows a Pokémon to be chosen for battle.
      Overrides:
      validateSingle in class BattleClause
      Parameters:
      pokemon - The Pokémon to check.
      Returns:
      Whether the rule allows the given Pokémon to be chosen for battle.