New command fix attempt

This commit is contained in:
MattBDev 2019-10-09 21:05:47 -04:00
parent c928564b59
commit e0895ef042

View File

@ -544,7 +544,10 @@ public final class PlatformCommandManager {
TaskManager.IMP.taskNow(() -> {
int space0 = args.indexOf(' ');
String arg0 = space0 == -1 ? args : args.substring(0, space0);
Optional<Command> optional = commandManager.getCommand(arg0);
if (arg0.startsWith("\\")) {
arg0 = arg0.substring(1);
}
Optional<Command> optional = commandManager.getCommand(arg0.);
if (!optional.isPresent()) {
System.out.println("No command for '" + arg0 + "' " + StringMan.getString(commandManager.getAllCommands().map(
Command::getName).collect(Collectors.toList())));