Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
Fixed commands not working
Dieser Commit ist enthalten in:
Ursprung
490e200a70
Commit
0b5eb903b6
@ -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;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren