Package valorless.rarespawns.ai
Class CustomSpellcaster
java.lang.Object
valorless.rarespawns.ai.CustomSpellcaster
- All Implemented Interfaces:
org.bukkit.event.Listener
Listener that overrides and customizes spellcasting for rare spellcasters.
Cancels Mojang's default spell choice and triggers a random spell from the configured list on the rare's EntityData, adding visuals and sounds.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidinit()Registers this listener with the server plugin manager.voidonSpellCast(org.bukkit.event.entity.EntitySpellCastEvent event) Intercepts spell casting for rare spellcasters, cancels the default, and triggers one of the configured spells after a short casting delay.
-
Constructor Details
-
CustomSpellcaster
public CustomSpellcaster()
-
-
Method Details
-
init
public static void init()Registers this listener with the server plugin manager. -
onSpellCast
public void onSpellCast(org.bukkit.event.entity.EntitySpellCastEvent event) Intercepts spell casting for rare spellcasters, cancels the default, and triggers one of the configured spells after a short casting delay.- Parameters:
event- spell cast event
-