Package com.sucy.skill.manager
Class AttributeManager
java.lang.Object
com.sucy.skill.manager.AttributeManager
Handles loading and accessing individual
attributes from the configuration.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassA single attribute templateclassRepresents one formula modifier for an attribute that can have conditions -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionAttributeManager(SkillAPI api) Sets up the attribute manager, loading the attribute data from the configuration. -
Method Summary
Modifier and TypeMethodDescriptionforComponent(EffectComponent component, String key) getAttribute(String key) Retrieves an attribute templateUnsafe getter for the attribute data.getKeys()Retrieves the available attribute keys.Retrieves the available attribute keys including both display names and config keys.Normalizes a config key or name into the config key for a unified identifier to store stats under.
-
Field Details
-
HEALTH
- See Also:
-
MANA
- See Also:
-
MANA_REGEN
- See Also:
-
PHYSICAL_DAMAGE
- See Also:
-
MELEE_DAMAGE
- See Also:
-
PROJECTILE_DAMAGE
- See Also:
-
PHYSICAL_DEFENSE
- See Also:
-
MELEE_DEFENSE
- See Also:
-
PROJECTILE_DEFENSE
- See Also:
-
SKILL_DAMAGE
- See Also:
-
SKILL_DEFENSE
- See Also:
-
MOVE_SPEED
- See Also:
-
ATTACK_SPEED
- See Also:
-
ARMOR
- See Also:
-
LUCK
- See Also:
-
ARMOR_TOUGHNESS
- See Also:
-
EXPERIENCE
- See Also:
-
HUNGER
- See Also:
-
HUNGER_HEAL
- See Also:
-
COOLDOWN
- See Also:
-
KNOCKBACK_RESIST
- See Also:
-
-
Constructor Details
-
AttributeManager
Sets up the attribute manager, loading the attribute data from the configuration. This is handled by SkillAPI automatically so other plugins should not instantiate this class.- Parameters:
api- SkillAPI reference
-
-
Method Details
-
getAttribute
Retrieves an attribute template- Parameters:
key- attribute key- Returns:
- template for the attribute
-
getAttributes
Unsafe getter for the attribute data.Do not use this method or modify it's return value unless you know exactly what you are doing.
- Returns:
- attributes map
-
forStat
-
forComponent
-
getKeys
Retrieves the available attribute keys. This does not include display names for attributes.- Returns:
- set of available attribute keys
-
getLookupKeys
Retrieves the available attribute keys including both display names and config keys.- Returns:
- display name and config keys for attributes
-
normalize
Normalizes a config key or name into the config key for a unified identifier to store stats under.- Parameters:
key- key to normalize- Returns:
- config key
-