How to replace /help in Bukkit plugin development?

Discussion in 'Plugins and Coding' started by olsyboy, Jul 15, 2015.

Thread Status:
Not open for further replies.
  1. olsyboy

    olsyboy Member

    Messages:
    215
    Likes Received:
    57
    Trophy Points:
    28
    I want a new /help page, mainly to make it easier to change this page between OPs and members,

    thanks
     
  2. alyphen

    alyphen Member

    Messages:
    101
    Likes Received:
    99
    Trophy Points:
    28
    If you simply want to override it, stick help as a command in your plugin.yml as you usually would, and add a HelpCommand class that implements CommandExecutor. Then just call getCommand("help").setExecutor(new HelpCommand()); from your onEnable method and override the onCommand method in your HelpCommand class - then you can give it any behaviour you want. Plugins are prioritised over Bukkit & Vanilla commands where they exist.
     
  3. olsyboy

    olsyboy Member

    Messages:
    215
    Likes Received:
    57
    Trophy Points:
    28
    Ah, thanks!
     
Thread Status:
Not open for further replies.