Command that Enables/Disables the plugin.

Discussion in 'Plugin Development' started by EdenCampo, Sep 28, 2011.

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

    EdenCampo

    Hello there.

    I wonder if there is a way to make a command the fully disables your plugin.
    like (/blah disable) and same with enable (/blah enable), if someone knows if there is an option to do this?also /blah reload..
    Thanks for the helpers!
     
  2. Offline

    Revver

    In onCommandSender get the plugin and then create a method to check if the plugin is disabled... If it is return true, else return to a command..

    not sure - still a beginner ;)
     
  3. Offline

    EdenCampo

    @Revver
    First thanks for the reply but:
    I'm not sure you've got it,
    I want to disable the plugin,not return the command lol.
     
  4. Offline

    Darkman2412

    There are methods in the PluginManager where you can disable/reload/enable plugins.
     
  5. Offline

    Technius

    You can't truly disable or enable plugins. You can only disable their command listeners... My plugin has an api you can use if you want.
     
    EdenCampo likes this.
  6. Offline

    EdenCampo

    @Darkman2412
    Thanks!
    @Technius
    Your plugin API is awesome,I'll try it right ahead,

    EDIT:API worked very well,easy to use,but you forgot to tell on Github you need to do
    Code:
    boolean usePME;
    :p
     
  7. Offline

    Technius

    Thanks :p
     
  8. Offline

    EdenCampo

    Well,lol when i tryed the plug it dosn't work :(
    Well,I tryed the PluginMangers options,I found how to disable the class the command is placed in,how i disable Listeners?
     
Thread Status:
Not open for further replies.

Share This Page