Solved Update Private plugin on command

Discussion in 'Plugin Development' started by Plo124, Apr 12, 2014.

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

    Plo124

    Hi, I am in seek of help in updating my plugin which is not on dev.bukkit.org

    This is how the current update procedure is:
    1. I compile code I work on
    2. I send .jar file via skype to target
    3. When we are both online, he accepts file
    4. He stops server swaps .jar file and starts server

    How I want it to work:
    1. I issue command on server
    2. All players get kicked and the server restarts
    3. When server is stopped another process runs and downloads file from DropBox
    4. Server starts
    5. ????
    6. Profit!

    Basically I dont know how to make it so the bukkit server will then start the updater process and then that will start bukkit again.

    What I have tried:
    - modifying some of the plugin update libs on the resources page. I dont know if this still has file perms and if I can do this in the same plugin and if it has to be listed on dev.bukkit.org
    - Searching how to start a process which can start a bukkit server when its stopped. I found a snippet of code but this didn't work.
     
  2. Offline

    Regablith

    I don't think you can get the server to download a file via a website.
     
  3. Offline

    Plo124

    Regablith
    its possible in Java, I just need to find a way to start and stop the bukkit server, which maintaining the console (using Windows)
     
  4. Offline

    zDylann

    How is there server hosted? VPS? Home computer? Windows? Linux?

    There are tutorials in the resource section to create a updater system in your plugin I believe.
     
  5. Offline

    Plo124

    zDylann
    This is a Home computer running Windows 7
     
  6. Offline

    zDylann

    Search the resource forums like I said for some kind of updater. Then if the update goes through just run the commands you need to do to kick,save and stop. Then setup your startup batch script to GOTO the top of the script after its stopped.(Google)
     
  7. Offline

    Plo124

    zDylann
    What about file permissions? The jar will be in use, so I cannot push new content to the file while the server is running.
     
  8. Offline

    zDylann

    This shouldn't be a problem if the plugin is being updated via java code.
     
  9. Offline

    Plo124

    It is, I have tried to do this before, and it doesnt work, but I'll try again just to be sure.

    zDylann
    Wow thank you, this actually did work.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  10. Offline

    zDylann

    Mark as solved!
     
  11. Offline

    Plo124

    zDylann
    Oh yeah sorry I forgot about that
     
Thread Status:
Not open for further replies.

Share This Page