Interface SpellManagerData

All Known Implementing Classes:
SpellManagerDataHolder

public interface SpellManagerData
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Marks the given spell as discovered for the player.
    Returns a map of all spell variables and their corresponding values.
    <T> T
    Retrieves the value of a specific spell variable.
    boolean
    Checks if the given spell has been discovered by the player.
    <T> void
    setVariable(ISpellVar<? super T> variable, T value)
    Sets the value of a specific spell variable.
    void
    Synchronises this SpellManagerData with the client.
    boolean
    Deletes the given spell from the player's discovered spells.
  • Method Details

    • sync

      void sync()
      Synchronises this SpellManagerData with the client.
    • getVariable

      <T> T getVariable(ISpellVar<T> var)
      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

      <T> void setVariable(ISpellVar<? super T> variable, T value)
      Sets the value of a specific spell variable.
      Type Parameters:
      T - the type of the spell variable
      Parameters:
      variable - the spell variable to set
      value - the value to set for the spell variable
    • getSpellData

      Map<ISpellVar,Object> getSpellData()
      Returns a map of all spell variables and their corresponding values.
      Returns:
      a Map containing all spell variables and their values
    • hasSpellBeenDiscovered

      boolean hasSpellBeenDiscovered(Spell spell)
      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

      boolean discoverSpell(Spell spell)
      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

      boolean undiscoverSpell(Spell spell)
      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