Reload Plugin

Discussion in 'Plugin Development' started by CmptrPrgmr, Aug 15, 2012.

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

    CmptrPrgmr

    Does anyone know how to just reload one plugin? I know you can do /reload, but that will reload every plugin. I just want to reload the plugin that I am creating.

    Would this work?

    Code:
    this.getPluginLoader().loadPlugin(File file);
     
  2. Offline

    j_selby

    You will have to unload it first, however Plugman can do this so you could look at its source code.
     
  3. Offline

    keensta

    YOu can do this.

    Code:Java
    1.  
    2. PluginManager plg = Bukkit.getPluginManager();
    3. Plugin plgname = plg.getPlugin("NAME");
    4. plg.disablePlugin(plgname);
    5. plg.enablePlugin(plgname);
    6.  

    Not sure if this is the best way but it gets the job done.
     
Thread Status:
Not open for further replies.

Share This Page