fix: Show helpful message when no supported updater loads

This commit is contained in:
ryanalexander 2025-02-17 08:34:36 +10:00
parent 2c0d632dc2
commit c729832ba9
No known key found for this signature in database
GPG Key ID: 5386BEA343C6ADE4

View File

@ -504,6 +504,17 @@ public class ProtocolLib extends JavaPlugin {
}
private void checkUpdates() {
// Do not run updater if no supported updater is loaded
if (this.updater == null) {
highlyVisibleError(
" WARNING ",
" ProtocolLib is unable to check for updates. ",
" You are likely not using a supported version (Such as CraftBukkit). "
);
ProtocolLibrary.disableUpdates();
return;
}
// Ignore milliseconds - it's pointless
long currentTime = System.currentTimeMillis() / MILLI_PER_SECOND;