Class SpellProperty<T>
java.lang.Object
com.binaris.wizardry.api.content.spell.properties.SpellProperty<T>
- Type Parameters:
T- The type of the property's value.
A class representing a property of a spell, such as its cost or cooldown. Each property has a type (e.g. Integer,
Float, Boolean), a default value, and a current value, these properties are identified by a unique string.
Properties can be created using the static factory methods provided, such as intProperty(String) or
booleanProperty(String, boolean). Once created, the property's value can be accessed and modified using
the get() and set(Object) methods respectively.
(Check DefaultProperties for examples of predefined properties.)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Tprotected Stringprotected IPropertyType<T>protected T -
Method Summary
Modifier and TypeMethodDescriptionstatic SpellProperty<Boolean>static SpellProperty<Boolean>booleanProperty(String id, boolean value) static SpellProperty<Byte>byteProperty(String id) static SpellProperty<Byte>byteProperty(String id, byte value) static SpellProperty<Map<String,Boolean>> contextMapProperty(String id, Map<String, Boolean> value) copyOf()protected static <T> SpellProperty<T>createProperty(String identifier, T defaultValue, IPropertyType<T> type) static SpellProperty<Double>doubleProperty(String id) static SpellProperty<Double>doubleProperty(String id, double value) booleanstatic SpellProperty<Float>floatProperty(String id) static SpellProperty<Float>floatProperty(String id, float value) static @Nullable SpellProperty<?>get()static SpellProperty<Integer>intProperty(String id) static SpellProperty<Integer>intProperty(String id, int value) static SpellProperty<Long>longProperty(String id) static SpellProperty<Long>longProperty(String id, long value) voidstatic SpellProperty<Short>shortProperty(String id) static SpellProperty<Short>shortProperty(String id, short value) static SpellProperty<String>stringProperty(String id) static SpellProperty<String>stringProperty(String id, String value)
-
Field Details
-
identifier
-
value
-
defaultValue
-
type
-
-
Method Details
-
byteProperty
-
shortProperty
-
intProperty
-
longProperty
-
floatProperty
-
doubleProperty
-
booleanProperty
-
stringProperty
-
byteProperty
-
shortProperty
-
intProperty
-
longProperty
-
floatProperty
-
doubleProperty
-
booleanProperty
-
stringProperty
-
contextMapProperty
-
createProperty
protected static <T> SpellProperty<T> createProperty(String identifier, T defaultValue, IPropertyType<T> type) -
fromID
-
get
-
getIdentifier
-
set
-
equals
-
getDefaultValue
-
copyOf
-