0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-19 17:02:13 +02:00

Fix CmdProcessor causing crashes

This commit is contained in:
Alexander 2019-07-08 16:04:58 +02:00
parent ee1cc44eed
commit 52627a39f8

View File

@ -54,7 +54,7 @@ public final class CmdProcessor implements ChatOutputListener
private Command parseCmd(String input) throws CmdNotFoundException
{
String cmdName = input.substring(0, input.indexOf(" "));
String cmdName = input.split(" ")[0];
Command cmd = cmds.getCmdByName(cmdName);
if(cmd == null)
@ -97,7 +97,7 @@ public final class CmdProcessor implements ChatOutputListener
public void printToChat()
{
String cmdName = input.substring(0, input.indexOf(" "));
String cmdName = input.split(" ")[0];
ChatUtils.error("Unknown command: ." + cmdName);
StringBuilder helpMsg = new StringBuilder();