Class CustomSpellcaster

java.lang.Object
valorless.rarespawns.ai.CustomSpellcaster
All Implemented Interfaces:
org.bukkit.event.Listener

public class CustomSpellcaster extends Object implements 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Registers this listener with the server plugin manager.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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