geforkt von Mirrors/FastAsyncWorldEdit
Print help on invalid arg
Dieser Commit ist enthalten in:
Ursprung
8812e1b60c
Commit
1071e7c226
@ -107,6 +107,7 @@ import com.sk89q.worldedit.command.argument.ZonedDateTimeConverter;
|
||||
import com.sk89q.worldedit.command.util.CommandPermissions;
|
||||
import com.sk89q.worldedit.command.util.CommandQueuedCondition;
|
||||
import com.sk89q.worldedit.command.util.PermissionCondition;
|
||||
import com.sk89q.worldedit.command.util.PrintCommandHelp;
|
||||
import com.sk89q.worldedit.command.util.SubCommandPermissionCondition;
|
||||
import com.sk89q.worldedit.entity.Entity;
|
||||
import com.sk89q.worldedit.entity.Player;
|
||||
@ -704,7 +705,6 @@ public final class PlatformCommandManager {
|
||||
exceptionConverter.convert(next);
|
||||
next = next.getCause();
|
||||
} while (next != null);
|
||||
|
||||
throw t;
|
||||
}
|
||||
} catch (ConditionFailedException e) {
|
||||
@ -734,6 +734,8 @@ public final class PlatformCommandManager {
|
||||
.color(TextColor.RED)
|
||||
.append(e.getRichMessage())
|
||||
.build());
|
||||
List<String> argList = parseArgs(event.getArguments()).map(Substring::getSubstring).collect(Collectors.toList());
|
||||
printUsage(actor, argList);
|
||||
} catch (Throwable t) {
|
||||
handleUnknownException(actor, t);
|
||||
} finally {
|
||||
@ -775,6 +777,11 @@ public final class PlatformCommandManager {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
private void printUsage(Actor actor, List<String> arguments) {
|
||||
PrintCommandHelp.help(arguments, 0, false,
|
||||
getCommandManager(), actor, "//help");
|
||||
}
|
||||
|
||||
private MemoizingValueAccess initializeInjectedValues(Arguments arguments, Actor tmp) {
|
||||
InjectedValueStore store = MapBackedValueStore.create();
|
||||
Actor actor = wrapActor(tmp, store);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren