Skip to content

Commit 4314a55

Browse files
fix: Show helpful message when no supported updater loads (#3358)
1 parent 2c0d632 commit 4314a55

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/java/com/comphenix/protocol/ProtocolLib.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,17 @@ private void updateConfiguration() {
504504
}
505505

506506
private void checkUpdates() {
507+
// Do not run updater if no supported updater is loaded
508+
if (this.updater == null) {
509+
highlyVisibleError(
510+
" WARNING ",
511+
" ProtocolLib is unable to check for updates. ",
512+
" You are likely not using a supported version (Such as CraftBukkit). "
513+
);
514+
ProtocolLibrary.disableUpdates();
515+
return;
516+
}
517+
507518
// Ignore milliseconds - it's pointless
508519
long currentTime = System.currentTimeMillis() / MILLI_PER_SECOND;
509520

0 commit comments

Comments
 (0)