Class OldGenModeProperty
java.lang.Object
com.pixelmonmod.pixelmon.battles.api.rules.property.OldGenModeProperty
- All Implemented Interfaces:
BattleProperty<EnumOldGenMode>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the default value when not supplied If returning an empty optional this means it isn't always requiredgetId()The id of the propertyGets a new instanceof thePropertyValue<T>Attempts to parse the object into aPropertyValue<T>Will returnOptional.empty()if fails to parsebooleanIf the property's value is required by the client for UI logic
-
Constructor Details
-
OldGenModeProperty
public OldGenModeProperty()
-
-
Method Details
-
getId
Description copied from interface:BattlePropertyThe id of the property- Specified by:
getIdin interfaceBattleProperty<EnumOldGenMode>- Returns:
- The id
-
requiredByClient
public boolean requiredByClient()Description copied from interface:BattlePropertyIf the property's value is required by the client for UI logic- Specified by:
requiredByClientin interfaceBattleProperty<EnumOldGenMode>- Returns:
- True if required by the client
-
parse
Description copied from interface:BattlePropertyAttempts to parse the object into aPropertyValue<T>Will returnOptional.empty()if fails to parse- Specified by:
parsein interfaceBattleProperty<EnumOldGenMode>- Parameters:
o- The object being parsed- Returns:
- The optional
PropertyValue<T>
-
getDefault
Description copied from interface:BattlePropertyGets the default value when not supplied If returning an empty optional this means it isn't always required- Specified by:
getDefaultin interfaceBattleProperty<EnumOldGenMode>- Returns:
- The default
Optional<PropertyValue<T>>
-
getInstance
Description copied from interface:BattlePropertyGets a new instanceof thePropertyValue<T>- Specified by:
getInstancein interfaceBattleProperty<EnumOldGenMode>- Returns:
- The new value instance
-