Class CastItemListener

java.lang.Object
studio.magemonkey.fabled.listener.FabledListener
studio.magemonkey.fabled.listener.CastItemListener
All Implemented Interfaces:
org.bukkit.event.Listener

public class CastItemListener extends FabledListener
Handles the alternate casting option for casting via a cycling slot
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cleans up the listener functions
    void
     
    void
    Re-initializes cast data on class change
    void
    onClick(org.bukkit.event.inventory.InventoryClickEvent event)
    Prevents moving the cast item
    void
    onDeath(org.bukkit.event.entity.PlayerDeathEvent event)
     
    void
    onDrop(org.bukkit.event.player.PlayerDropItemEvent event)
    Casts a skill when dropping the cast item
    void
    onInteract(org.bukkit.event.player.PlayerInteractEvent event)
    Cycles through skills upon interact
    void
    onItemHeld(org.bukkit.event.player.PlayerItemHeldEvent event)
     
    void
    onQuit(org.bukkit.event.player.PlayerQuitEvent event)
    Removes the cast item on quit
    void
    Adds unlocked skills to the skill bar if applicable
    void
    onWorldChange(org.bukkit.event.player.PlayerChangedWorldEvent event)
     
    void
    onWorldChangePre(org.bukkit.event.player.PlayerChangedWorldEvent event)
    Enables/disables cast when changing worlds

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CastItemListener

      public CastItemListener()
  • Method Details

    • init

      public void init()
      Overrides:
      init in class FabledListener
    • cleanup

      public void cleanup()
      Cleans up the listener functions
      Overrides:
      cleanup in class FabledListener
    • onClassChange

      public void onClassChange(PlayerClassChangeEvent event)
      Re-initializes cast data on class change
      Parameters:
      event - event details
    • onWorldChangePre

      public void onWorldChangePre(org.bukkit.event.player.PlayerChangedWorldEvent event)
      Enables/disables cast when changing worlds
      Parameters:
      event - event details
    • onWorldChange

      public void onWorldChange(org.bukkit.event.player.PlayerChangedWorldEvent event)
    • onQuit

      public void onQuit(org.bukkit.event.player.PlayerQuitEvent event)
      Removes the cast item on quit
      Parameters:
      event - event details
    • onUnlock

      public void onUnlock(PlayerSkillUnlockEvent event)
      Adds unlocked skills to the skill bar if applicable
      Parameters:
      event - event details
    • onClick

      public void onClick(org.bukkit.event.inventory.InventoryClickEvent event)
      Prevents moving the cast item
      Parameters:
      event - event details
    • onDrop

      public void onDrop(org.bukkit.event.player.PlayerDropItemEvent event)
      Casts a skill when dropping the cast item
      Parameters:
      event - event details
    • onDeath

      public void onDeath(org.bukkit.event.entity.PlayerDeathEvent event)
    • onInteract

      public void onInteract(org.bukkit.event.player.PlayerInteractEvent event)
      Cycles through skills upon interact
      Parameters:
      event - event details
    • onItemHeld

      public void onItemHeld(org.bukkit.event.player.PlayerItemHeldEvent event)