Class CommandRegister


  • public class CommandRegister
    extends java.lang.Object
    A class that registers commands using the Brigadier API

    All credit for this class goes to realEntity303, author of PlugManX, I just modified it to be a bit nicer

    • Constructor Summary

      Constructors 
      Constructor Description
      CommandRegister()
      Initialize the command register
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void register​(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.command.Command command)
      Register a command from another plugin
      void sync()
      Refreshes the command list
      • Methods inherited from class java.lang.Object

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

      • CommandRegister

        public CommandRegister()
        Initialize the command register
    • Method Detail

      • register

        public void register​(@NotNull
                             @NotNull org.bukkit.plugin.Plugin plugin,
                             @NotNull
                             @NotNull org.bukkit.command.Command command)
        Register a command from another plugin
        Parameters:
        plugin - the plugin that owns the command
        command - the command to register
      • sync

        public void sync()
        Refreshes the command list