mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
Fix crash from console-commands throwing exception. Fixes BUKKIT-2479
When 1.3.1 was released, a try-catch block was removed from the tick loop that called the method in NMS to handle commands. This restores a try-catch to prevent the console from crashing the server. By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
parent
e719bbd88c
commit
66380e6d14
1 changed files with 6 additions and 1 deletions
|
@ -485,7 +485,12 @@ public final class CraftServer implements Server {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return dispatchCommand(sender, serverCommand.command);
|
try {
|
||||||
|
return dispatchCommand(sender, serverCommand.command);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
getLogger().log(Level.WARNING, "Unexpected exception while parsing console command \"" + serverCommand.command + '"', ex);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean dispatchCommand(CommandSender sender, String commandLine) {
|
public boolean dispatchCommand(CommandSender sender, String commandLine) {
|
||||||
|
|
Loading…
Reference in a new issue