Interface BattleRequirement
- All Known Implementing Classes:
ItemBanBattleRequirement
,LogicalANDBattleRequirement
,LogicalORBattleRequirement
,NoDuplicateItemBattleRequirement
,NoDuplicateSpecBattleRequirement
,NoDuplicateSpeciesBattleRequirement
,SpecBasedAllowListBattleRequirement
,SpecBasedBanBattleRequirement
,SpeedBattleRequirement
public interface BattleRequirement
Represents a requirement that must be met for the battle to be able to start.
This will check the Pokémon in the party against the requirement and return true if the requirement is met, and false if it is not.
This will check the Pokémon in the party against the requirement and return true if the requirement is met, and false if it is not.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec
<? extends BattleRequirement> codec()
Returns the codec for this requirement.BattleRequirementType
<? extends BattleRequirement> type()
Returns the type of this requirement.boolean
Validates the requirement against the given Pokémon party.
-
Field Details
-
CODEC
-
-
Method Details
-
codec
com.mojang.serialization.MapCodec<? extends BattleRequirement> codec()Returns the codec for this requirement.- Returns:
- The codec for this requirement.
-
type
BattleRequirementType<? extends BattleRequirement> type()Returns the type of this requirement.- Returns:
- The type of this requirement.
-
validate
Validates the requirement against the given Pokémon party.- Parameters:
party
- The Pokémon party to validate against this requirement.- Returns:
- True if the requirement is met, false otherwise.
-