Skip to content

Commit

Permalink
Fix server startup issue 1.19 (SkriptLang#4849)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLimeGlass authored Jun 29, 2022
1 parent 9abd6af commit 97f1d3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/ch/njol/skript/Skript.java
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,8 @@ public void onPluginDisable(PluginDisableEvent event) {

try {
// Spigot removed the mapping for this method in 1.18, so its back to obfuscated method
String isRunningMethod = Skript.isRunningMinecraft(1, 18) ? "v" : "isRunning";
// 1.19 mapping is u and 1.18 is v
String isRunningMethod = Skript.isRunningMinecraft(1, 19) ? "u" : Skript.isRunningMinecraft(1, 18) ? "v" :"isRunning";
IS_RUNNING = MC_SERVER.getClass().getMethod(isRunningMethod);
} catch (NoSuchMethodException e) {
throw new RuntimeException(e);
Expand Down

0 comments on commit 97f1d3e

Please sign in to comment.