Creating a custom reload command.

Discussion in 'Plugin Development' started by Fergym, Oct 25, 2015.

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


    Hi, so I have a config in my plugin, and a reload command, but the stock reload command is /reload, and I'd like to know how to customize it a bit more say "[plugin name ] reload" or possibly just creating a permission for the /reload command? If anyone could help me out that would be fantastic. Thanks.
  2. Offline


    use the PlayerCommandPreprocessEvent check if the command is reload -> check for a certain permission -> If they don't have that permission just cancel the event.

    as for the first part what do you mean?
  3. Offline


    If you want to override the reload command, do as @boysnnoco said. If you want the ]pluginname[ reload,m use the following :
    1. Create a command called [plugins name]
    2. Check if the args are greater than 0
    3. Check if the first arg is "reload"
    4. if so, reload.
Thread Status:
Not open for further replies.

Share This Page