Class AbilityClause
java.lang.Object
com.pixelmonmod.pixelmon.battles.api.rules.clauses.BattleClause
com.pixelmonmod.pixelmon.battles.api.rules.clauses.type.AbilityClause
- All Implemented Interfaces:
IEncodeable,Comparable<BattleClause>
Prevents Pokémon from having certain Abilities.
-
Constructor Summary
ConstructorsConstructorDescriptionAbilityClause(String id, Class<? extends AbstractAbility>... abilities) Creates a clause to ban Abilities. -
Method Summary
Modifier and TypeMethodDescriptionbooleanvalidateSingle(Pokemon pokemon) Checks if the rule allows a Pokémon to be chosen for battle.Methods inherited from class com.pixelmonmod.pixelmon.battles.api.rules.clauses.BattleClause
compareTo, decodeInto, encodeInto, equals, getDescription, getID, getLocalizedName, getLocalizedName, hashCode, setDescription, toString, validateTeam
-
Constructor Details
-
AbilityClause
Creates a clause to ban Abilities.- Parameters:
id- The unique ID of the battle clause.abilities- The banned Abilities.
-
-
Method Details
-
validateSingle
Description copied from class:BattleClauseChecks if the rule allows a Pokémon to be chosen for battle.- Overrides:
validateSinglein classBattleClause- Parameters:
pokemon- The Pokémon to check.- Returns:
- Whether the rule allows the given Pokémon to be chosen for battle.
-