Class CommandListener

java.lang.Object
studio.magemonkey.codex.mccore.commands.CommandListener
All Implemented Interfaces:
org.bukkit.event.Listener

public class CommandListener extends Object implements org.bukkit.event.Listener

Listener for cleaning up configurable commands automatically for other plugins when they are disabled.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates the listener for configurable commands
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onCommand(org.bukkit.event.player.PlayerCommandPreprocessEvent event)
    Handles player commands
    void
    onCommand(org.bukkit.event.server.ServerCommandEvent event)
    Handles server commands
    void
    onDisable(org.bukkit.event.server.PluginDisableEvent event)
    Unregisters commands for plugins when they are disabled

    Methods inherited from class java.lang.Object

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

    • CommandListener

      public CommandListener(CodexEngine plugin)
      Creates the listener for configurable commands
      Parameters:
      plugin - plugin reference
  • Method Details

    • onDisable

      public void onDisable(org.bukkit.event.server.PluginDisableEvent event)

      Unregisters commands for plugins when they are disabled

      Parameters:
      event - event details
    • onCommand

      public void onCommand(org.bukkit.event.player.PlayerCommandPreprocessEvent event)
      Handles player commands
      Parameters:
      event - event details
    • onCommand

      public void onCommand(org.bukkit.event.server.ServerCommandEvent event)
      Handles server commands
      Parameters:
      event - event details