Skip to content

Commit

Permalink
only shutdown server on missing packetevents because of plugman users
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Jan 6, 2025
1 parent 658cce1 commit 0dbc95c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void onEnable() {
" https://ci.codemc.io/job/retrooper/job/packetevents/ ",
" "
).forEach(prefixedLogger::error);
getServer().shutdown();
getServer().shutdown(); // Don't allow plugman/serverutil users to hot-load this plugin if packetevents is missing.
return;
}

Expand All @@ -107,7 +107,7 @@ public void onEnable() {
if (serverVersion.isOlderThan(ServerVersion.V_1_19_4) ||
(serverVersion.equals(ServerVersion.V_1_19_4) && !PlatformUtil.isFolia())) {
prefixedLogger.error("This plugin jar is incompatible with your Server. Please use the Legacy jar.");
getServer().shutdown();
getServer().getPluginManager().disablePlugin(this);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void onEnable() {

if (PlatformUtil.isFolia()) {
getLogger().severe("Please use the Folia jar instead of modifying the plugin.yml.");
getServer().shutdown();
getServer().getPluginManager().disablePlugin(this);
return;
}

Expand All @@ -92,7 +92,7 @@ public void onEnable() {
" https://ci.codemc.io/job/retrooper/job/packetevents/ ",
" "
).forEach(prefixedLogger::error);
getServer().shutdown();
getServer().shutdown(); // Don't allow plugman/serverutil users to hot-load this plugin if packetevents is missing.
return;
}

Expand Down

0 comments on commit 0dbc95c

Please sign in to comment.