Updater misinforms and seemingly cannot auto update
libraryaddict opened this issue ยท 6 comments
Describe the bug
The updater successfully checks for an update, after which it informs the user that the update has been downloaded and will be processed when the server restarts.
This is false on two levels.
The first is that there was no download, the second is that the update option is false in config.
To Reproduce
Start server and wait a second
Expected behavior
An update to either be downloaded, or a better message to be informed
Additional context
I also don't believe the update system works either.
You can fetch and download updates from Github itself, you can see how I implemented it in my own project here. This shouldn't be much of an issue as you've already done some releases on Github.
Github should be used, especially as you may hit SpigotMC's Cloudflare protection.
If using Bukkit's update system to replace jars, then it's worth noting that the downloaded jar must be placed in "plugins/updates/" folder, and have the same name as the jar it will be replacing.
https://github.com/dmulloy2/ProtocolLib/blob/master/src/main/java/com/comphenix/protocol/utility/Util.java#L61
not sure if that spigot check is a good idea to switch the updater. I would just always use the spigot updater (and potentially change that updater to use the new api https://github.com/SpigotMC/XenforoResourceManagerAPI)
if this is something @dmulloy2 wants, I would PR this. basicalling making spigot the only updater, without downloading, using the new api.
Even then it doesn't look like it exposes the download itself, and I'm concerned about issues with cloudflare
thats why I said no downloading. the current spigot updater already doesnt download, so no real regression for most of the users.