[SOLVED]Is there a code in spigot for autoupdating plugin

Discussion in 'Programming' started by IvanPekov95, Mar 14, 2018.

  1. Hello guys
    I want to know is there a possible way to get code in a spigot plugin for autoupdating? In the bukkit haves a method and i know it, tried it and didnt work. If haves post the code or give a link to it. Thank you!
  2. What do you mean? You want the plugin to grab the latest version from here and automatically download it on your server?
  3. Strahan


    I don't know if it is possible or not, but even if it is isn't not a good idea. Any server operator with a modicum of caution would never allow anything to auto update. When I ran my server and I wanted to update a plugin, I would first roll it out to a staging server for thorough testing before I'd consider allowing it to be implemented in production. The thought of letting production plugins update themselves is scary.
  4. TheJavaHacker

    TheJavaHacker Previously TheTARDIS2176

    I hold a similar stance... Why the heck would I want to allow plugins to auto-update to a live server? I don't even do that for my own coded plugins... I always have a test server running somewhere to run any update plugins, first I run it on my home machine in a singular server without plugins on, just itself (Yes, I have the storage space) and then I run it on a clone of my live production server before I can give it a good ole shove to my actual live server.
  5. Thanks for all replies on the topic! Im from Bulgaria and might be understanding i post very late in your vision but for the timezones i can only apply in this time something like this.

    Something like that, but for spigot. For craftbukkit is having but from releasing the spigot no one is using craftbukkit anyway.

    What do you mean with that?

    Me too. Before i post the coded plugin I test it in a test server for bugs and anything like that. Sometimes haves errors, sometimes is working properly
  6. Strahan


    I mean if this is a plugin you are intending to release to the general public, if it is configurable as to whether or not it automatically downloads updates the majority of sensible server operators will disable the feature so you will have spent the time on this feature for naught. Auto updating plugins are something most reasonable admins wouldn't want, as they want to keep a stable platform for their users and being a novice developer there is a possibility that you push an update that causes problems. Plus then there is the paranoid side of me who would worry that I install a plugin manually that I decompiled and vetted then if it updates itself then it's running code I did not go over.

    Maybe other people wouldn't mind it, but I would not auto update and if I plugin requires it, I would just not use it.
  7. Okay. So i will not add the auto updater if haves just because the stability of the server? The plugin developers add auto updaters and dont care for the stability of the server just because they want downloads on the plugin and to be to the latest version plugin. Ik that some server developers will turn off the function, but its cool to have that s*it in the plugin just because you dont know when you'll need to use it.
  8. Strahan


    I mean, yea, of course if you want to write it don't let me stop you. I'm just giving my $0.02 :)
  9. To the main topic: is it haves method for autoupdating in spigot? Not mean that one that nowadays is 4 years old written on java 6, i mean autoupdater that is compatible with spigot and java 8
  10. MiniDigger


    spigot doesn't allow you to download files from here using code, cloudflare blocks that to prevent spoofing of download counts.
    so all you can and should do is a update checker. spigot provides an endpoint to get the latest version of your plugin on spigot:
    you can just check that against the currently installed version and print out that there is an update available.
  11. Thank you very much MiniDigger, ill try to do that!

Share This Page