Class BukkitComponent

java.lang.Object
com.zachsthings.libcomponents.AbstractComponent
com.zachsthings.libcomponents.bukkit.BukkitComponent
All Implemented Interfaces:
org.bukkit.command.CommandExecutor

public abstract class BukkitComponent extends com.zachsthings.libcomponents.AbstractComponent implements org.bukkit.command.CommandExecutor
A component written for a Bukkit server
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected com.sk89q.minecraft.util.commands.CommandsManager<org.bukkit.command.CommandSender>
    The CommandsManager where all commands are registered for this component.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
     
    boolean
    onCommand​(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String alias, String[] args)
     
    void
    registerCommands​(Class<?> clazz)
     
    void
    setUp​(BasePlugin plugin, com.sk89q.minecraft.util.commands.CommandsManager<org.bukkit.command.CommandSender> commands)
     
    void
     

    Methods inherited from class com.zachsthings.libcomponents.AbstractComponent

    configure, enable, getComponentLoader, getInformation, getRawConfiguration, isEnabled, reload, saveConfig, saveConfig, setUp

    Methods inherited from class java.lang.Object

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

    • commands

      protected com.sk89q.minecraft.util.commands.CommandsManager<org.bukkit.command.CommandSender> commands
      The CommandsManager where all commands are registered for this component.
  • Constructor Details

    • BukkitComponent

      public BukkitComponent()
  • Method Details

    • setUp

      public void setUp(BasePlugin plugin, com.sk89q.minecraft.util.commands.CommandsManager<org.bukkit.command.CommandSender> commands)
    • disable

      public void disable()
      Overrides:
      disable in class com.zachsthings.libcomponents.AbstractComponent
    • registerCommands

      public void registerCommands(Class<?> clazz)
    • unregisterCommands

      public void unregisterCommands()
    • onCommand

      public boolean onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String alias, String[] args)
      Specified by:
      onCommand in interface org.bukkit.command.CommandExecutor
    • getCommands

      public Map<String,​String> getCommands()
      Specified by:
      getCommands in class com.zachsthings.libcomponents.AbstractComponent