Commit graph

90 commits

Author SHA1 Message Date
Frank van der Heijden
e9f3049c07
Fix config generation names showing incorrectly in console 2021-05-02 12:08:56 +02:00
Frank van der Heijden
b5a2fd33ab
Merge branch 'master' into fix/watchplugin
# Conflicts:
#	Common/src/main/java/net/frankheijden/serverutils/common/tasks/PluginWatcherTask.java
2021-03-25 16:52:31 +01:00
Frank van der Heijden
0e1bee0ca1
Fixes watchplugin not reloading when the file is instantly written 2021-03-25 16:45:42 +01:00
Frank van der Heijden
5226866a74
Remove commons-codec as dep for MD hashing 2021-02-22 15:56:39 +01:00
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
a0a6826d05
Fix empty plugins prefix showing as 'null' 2021-02-03 19:01:11 +01:00
Frank van der Heijden
c787bcfe3c
Implement PluginEvent API 2021-01-30 16:40:43 +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
1fde72e522
Remove old config options when unused 2021-01-30 14:06:24 +01:00
Frank van der Heijden
2dcc4f36ee
Don't send FormatBuilder if string is empty 2021-01-29 22:00:36 +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
6ebe0073ea
Make PluginManagers independent from the main class 2021-01-16 15:34:58 +01:00
Frank van der Heijden
8a855d6935
Refactor reflections and use MinecraftReflection 2020-12-21 00:11:31 +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
4a374c5f43
Feature: unload bukkit commands per config.yml 2020-10-12 17:37:07 +02: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
31f1d4d259
Load ServerUtils in a runnable when updating 2020-10-01 19:36:06 +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
e2a9fb1dc3
Fix 1_16_R2 bukkit config reload error
- Refactored VersionParam to include patch version specification
- Added ConstructorParam to cache constructors & get the default constructor.
2020-09-29 13:38:16 +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
a0bdaeb2fc
Bring back customisable messages for reloading ServerUtils using wacky methods 2020-07-20 14:14:23 +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
71b6a5fa02
v2.0.5 - Fix for reloading ourselves 2020-07-20 00:37:16 +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
776159d91e
Implement some test cases for HexUtils 2020-07-10 19:41:51 +02:00
Frank van der Heijden
0ed2b567c8
Add missing command completions for BungeeCord 2020-07-09 13:39:01 +02:00
Frank van der Heijden
e5038fce31
Cleanup reflection parameters 2020-07-06 12:05:18 +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
f728c3e6bb
v2.0.1 - Hex color support 2020-07-05 20:16:45 +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
Frank van der Heijden
23e8e80191
Initial BungeeCord edition 2020-07-04 21:30:34 +02:00
Frank van der Heijden
4416d55173
Modularise project 2020-07-03 15:52:56 +02:00