1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Reload plugin

Discussion in 'Development' started by gistrec, Mar 1, 2017.

  1. gistrec

    gistrec Witch

    Messages:
    68
    GitHub:
    gistrec
    How I can reload plugin, when server running?
    (I would like edit and reload plugin, when server running)
    (Not disable and enable!!!)
    I try:
    PHP:
    $oldPlugin $server->getPluginManager()->getPlugin($pluginName);
    $server->getPluginManager()->disablePlugin($oldPlugin);
    $pluginPath $oldPlugin->getDataFolder();
    $newPlugin $server->getPluginManager()->loadPlugins($pluginPath);
     
    Last edited: Mar 1, 2017
  2. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    what do you mean by reload if you don't mean to disable and re-enable it?
     
  3. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    Simply run onEnable function to reload stuff? I'm not exactly sure what you're trying to do but modifying a working phar is a bad idea.
     
    gistrec likes this.
  4. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    Muqsit, Palente and gistrec like this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.