From 0b5eb903b6c04c496ffe490674815d3048f11973 Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Thu, 6 Feb 2020 15:34:22 -0500 Subject: [PATCH] Fixed commands not working --- .../extension/platform/PlatformCommandManager.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java index ba83ca62c..2e926cd6e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java @@ -616,7 +616,12 @@ public final class PlatformCommandManager { public void handleCommand(CommandEvent event) { Request.reset(); Actor actor = event.getActor(); - String args = event.getArguments(); + String args; + if (event.getArguments().length() > 1) { + args = event.getArguments().substring(1); + } else { + args = event.getArguments(); + } TaskManager.IMP.taskNow(() -> { int space0 = args.indexOf(' '); String arg0 = space0 == -1 ? args : args.substring(0, space0); @@ -689,11 +694,12 @@ public final class PlatformCommandManager { exceptionConverter.convert(next); next = next.getCause(); } while (next != null); + throw t; } } catch (ConditionFailedException e) { if (e.getCondition() instanceof PermissionCondition) { - actor.printError(Caption.of("fawe.error.no.perm", StringMan.getString(((PermissionCondition) e.getCondition()).getPermissions()))); + actor.printError(TranslatableComponent.of("worldedit.command.permissions")); } else { actor.print(e.getRichMessage()); } @@ -819,6 +825,7 @@ public final class PlatformCommandManager { } throw t; } + event.setSuggestions(suggestions.stream() .map(suggestion -> { int noSlashLength = arguments.length() - 1;