Package noppes.npcs.api.handler
Interface IMagicHandler
-
public interface IMagicHandler
Provides methods to access and modify magic and magic cycles. Implementations of this interface are responsible for managing the lifecycle, storage, and associations between individual magics and cycles.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addMagicToCycle(int magicId, int cycleId, int index, int priority)
Adds a magic to a specific cycle with ordering details.IMagicCycle
getCycle(int cycleID)
Retrieves a magic cycle (or category) by its unique ID.IMagic
getMagic(int magicId)
Retrieves a magic instance by its unique ID.void
removeMagicFromCycle(int magicId, int cycleId)
Removes a magic from a specified cycle.
-
-
-
Method Detail
-
getMagic
IMagic getMagic(int magicId)
Retrieves a magic instance by its unique ID.- Parameters:
magicId
- the unique identifier of the magic- Returns:
- the magic corresponding to the given ID, or null if not found
-
getCycle
IMagicCycle getCycle(int cycleID)
Retrieves a magic cycle (or category) by its unique ID.- Parameters:
cycleID
- the unique identifier of the magic cycle- Returns:
- the magic cycle corresponding to the given ID, or null if not found
-
addMagicToCycle
void addMagicToCycle(int magicId, int cycleId, int index, int priority)
Adds a magic to a specific cycle with ordering details. The provided index and priority help determine the magic's position in the cycle.- Parameters:
magicId
- the unique identifier of the magic to addcycleId
- the unique identifier of the cycle to add the magic toindex
- the index position within the cyclepriority
- the priority value within the cycle
-
removeMagicFromCycle
void removeMagicFromCycle(int magicId, int cycleId)
Removes a magic from a specified cycle.- Parameters:
magicId
- the unique identifier of the magic to removecycleId
- the unique identifier of the cycle from which the magic is removed
-
-