Commit graph

19 commits

Author SHA1 Message Date
Phil Gibson
b51ff445dd
Fix watched plugins reloading without ensuring the file has fully uploaded first (#8)
* build: add Apache codec library

Utilise the Apache commons codec library, which has file hashing and checking functions. This will be useful for a fix on hotreloading plugins.

* feat: run tasks later on taskmanagers

Add the ability to run tasks at a later date on task managers.
This is expressed in ticks for bungeecord and bukkit, and is converted to milliseconds for bungeecord.

* feat: add method to get hash of file

Add a method to get the MD5 hash of a file.

* fix: watching plugins waits until the plugin has finished uploading

If a watched plugin is changed, it will no longer immediately reload the plugin. Instead, it will check every 10 ticks (500 milliseconds for BungeeCord) to see if the file MD5 checksum has changed.

If it hasn't, then we can presume the file upload has completed and reload the plugin.

* build: bump version to 2.5.1

* build: relocate apache codec

Relocate the Apache Codec to avoid dependency clashes

* perf: remove unnecessary task call
2021-02-03 20:36:31 +01:00
Frank van der Heijden
51202f1116
Only check for updates each 30 minutes, fixes #6 2021-01-30 14:52:43 +01:00
Frank van der Heijden
b46f6fbb1f
Refactor UpdaterCheckerTask
Update checking/downloading/installing can now be configured precisely and more intuitive in the config.
2021-01-30 14:41:37 +01:00
Frank van der Heijden
a11d703c42
Should probably remove that one ;) 2021-01-16 21:47:11 +01:00
Frank van der Heijden
bfb2f3383c
Add check in case ServerUtilsUpdater is already present 2021-01-16 17:25:32 +01:00
Frank van der Heijden
466e2659e8
Update dependencies
- Updated checkstyle
- Fixed new checkstyle issues
- Added staged feature: reloading server.properties partially
2020-12-19 15:19:23 +01:00
Frank van der Heijden
99b5aadefe
Download ServerUtilsUpdater on the fly instead of shading it in 2020-10-04 16:16:54 +02:00
Frank van der Heijden
0f754e1c38
Move upgrade message to the updater 2020-10-04 15:32:31 +02:00
Frank van der Heijden
69a0918a77
Delete updater jar file if already exists 2020-10-01 19:34:02 +02:00
Frank van der Heijden
2c1c92fef6
Fix auto-updater failing
- Implemented a new self-reload system, which will boot up a separate plugin to load ServerUtils back up again.
2020-09-29 19:09:40 +02:00
Frank van der Heijden
b47db98420
Close async tasks properly when shutting down 2020-07-27 01:02:50 +02:00
Frank van der Heijden
0ed6747e4b
Cast to object to prevent wrong overloaded method call 2020-07-20 20:27:39 +02:00
Frank van der Heijden
07719cc1cc
Feature - plugin watcher, detect file changes & reload 2020-07-20 20:19:07 +02:00
Frank van der Heijden
6c8a93dc1b
Update on sync thread where possible 2020-07-20 02:06:28 +02:00
Frank van der Heijden
4b6008299b
Close plugins internally when reloading them instead of externally 2020-07-19 21:55:00 +02:00
Frank van der Heijden
e27e9fb4ea
Use artifact name when auto-updating plugin 2020-07-11 12:20:51 +02:00
Frank van der Heijden
584ce8be4d
v2.0.2 - Improve reloading and cleaning up of BungeeCord plugins.
- Cleanup PluginClassLoader properly
- Cancel plugin tasks properly
- Fixed automatic updater on bungee
2020-07-05 21:59:26 +02:00
Frank van der Heijden
af4c7ba214
Comply with checkstyle again 2020-07-05 16:59:07 +02:00
Frank van der Heijden
e67b20dee0
More abstractions
- Abstracted UpdateCheckerTask
- Merged PluginProvider into the PluginManagers
2020-07-05 16:07:36 +02:00