Problem updating my plugin

Discussion in 'Plugin Development' started by IkeVoodoo, Sep 28, 2020.

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

    IkeVoodoo

    Hello, as the title says, i have a problem updating my plugin, what i am doing:

    Getting the latest release from github and checking if there is a newer versions

    if it is, download it, then enable it, while disabling the old version

    the last part "then enable it while disabling the old version" is where i am having problems, i tought about having a mini plugin embedd in my plugin wich would get deployed, switch the versions, and removed, but still here i have a problem, how would i go about loading and unloading plugins? Since in the bukkit API i don't see anything like that (from IDE searching, i will mark this as solved if i find what i am looking for in the API documentation), even then, does Bukkit allow to having a plugin inside your plugin, or will it break it? (as a .jar)

    Thanks in advance :D
     
  2. Online

    timtower Administrator Administrator Moderator

    @IkeVoodoo You can make an "update" folder in the plugin directory, put the new jar there, restart the server.
     
  3. Offline

    IkeVoodoo

    i mean, without having to restart, i know it is possible (example is PlugMan), i just can't figure out how to do it, i could use their method, but i don't know how good of a person i will be if i do
     
  4. Online

    timtower Administrator Administrator Moderator

    @IkeVoodoo They don't try to update the running jar though. They stop it first.
    Normal updater libs use the update folder as well and reload the server.
     
  5. Offline

    IkeVoodoo

    hm
    i will try another approach, having a mini plugin embedd in my plugin that gets deployed and switches version, though i have to unload and load
     
Thread Status:
Not open for further replies.

Share This Page