Class CurrentSpellManager
- java.lang.Object
-
- com.realtime.crossfire.jxclient.spells.CurrentSpellManager
-
public class CurrentSpellManager extends java.lang.Object
Manages the currently selected spell.
-
-
Constructor Summary
Constructors Constructor Description CurrentSpellManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSpellListener(@NotNull CurrentSpellManagerListener listener)
Adds a spell listener to be notified if the current spell object has changed.@Nullable Spell
getCurrentSpell()
Returns the currently selected spell object.void
removeSpellListener(@NotNull CurrentSpellManagerListener listener)
Removes a spell listener.void
setCurrentSpell(@Nullable Spell spell)
Sets the currently selected spell.
-
-
-
Method Detail
-
setCurrentSpell
public void setCurrentSpell(@Nullable @Nullable Spell spell)
Sets the currently selected spell.- Parameters:
spell
- the spell to selected
-
getCurrentSpell
@Nullable public @Nullable Spell getCurrentSpell()
Returns the currently selected spell object.- Returns:
- the spell object, or
null
if no spell is selected
-
addSpellListener
public void addSpellListener(@NotNull @NotNull CurrentSpellManagerListener listener)
Adds a spell listener to be notified if the current spell object has changed.- Parameters:
listener
- the listener to add
-
removeSpellListener
public void removeSpellListener(@NotNull @NotNull CurrentSpellManagerListener listener)
Removes a spell listener.- Parameters:
listener
- the listener to remove
-
-