Interface SpellManagerData
- All Known Implementing Classes:
SpellManagerDataHolder
public interface SpellManagerData
-
Method Summary
Modifier and TypeMethodDescriptionbooleandiscoverSpell(Spell spell) Marks the given spell as discovered for the player.Returns a map of all spell variables and their corresponding values.<T> TgetVariable(ISpellVar<T> var) Retrieves the value of a specific spell variable.booleanhasSpellBeenDiscovered(Spell spell) Checks if the given spell has been discovered by the player.<T> voidsetVariable(ISpellVar<? super T> variable, T value) Sets the value of a specific spell variable.voidsync()Synchronises this SpellManagerData with the client.booleanundiscoverSpell(Spell spell) Deletes the given spell from the player's discovered spells.
-
Method Details
-
sync
void sync()Synchronises this SpellManagerData with the client. -
getVariable
Retrieves the value of a specific spell variable.- Type Parameters:
T- the type of the spell variable- Parameters:
var- the spell variable to retrieve- Returns:
- the value of the specified spell variable
-
setVariable
Sets the value of a specific spell variable.- Type Parameters:
T- the type of the spell variable- Parameters:
variable- the spell variable to setvalue- the value to set for the spell variable
-
getSpellData
Returns a map of all spell variables and their corresponding values.- Returns:
- a Map containing all spell variables and their values
-
hasSpellBeenDiscovered
Checks if the given spell has been discovered by the player.- Parameters:
spell- the Spell to check- Returns:
- true if the spell has been discovered, false otherwise
-
discoverSpell
Marks the given spell as discovered for the player.- Parameters:
spell- the Spell to mark as discovered- Returns:
- true if the spell was not already discovered, false otherwise
-
undiscoverSpell
Deletes the given spell from the player's discovered spells.- Parameters:
spell- the Spell to mark as undiscovered- Returns:
- true if the spell was previously discovered, false otherwise
-