Dieser Commit ist enthalten in:
Ursprung
384605c7ce
Commit
3701f6f5ff
@ -182,10 +182,10 @@ class CommandPart<T> {
|
|||||||
})) {
|
})) {
|
||||||
return new CheckArgumentResult(false, null);
|
return new CheckArgumentResult(false, null);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return new CheckArgumentResult(value != null, value);
|
return new CheckArgumentResult(value != null, value);
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
|
||||||
return new CheckArgumentResult(false, null);
|
return new CheckArgumentResult(false, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -75,7 +75,7 @@ public class SubCommand<T> {
|
|||||||
if (!validator.validate(sender, sender, (s, objectArgs) -> {
|
if (!validator.validate(sender, sender, (s, objectArgs) -> {
|
||||||
abstractSWCommand.sendMessage(sender, s, objectArgs);
|
abstractSWCommand.sendMessage(sender, s, objectArgs);
|
||||||
})) {
|
})) {
|
||||||
throw new CommandNoHelpException();
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
method.setAccessible(true);
|
method.setAccessible(true);
|
||||||
@ -87,7 +87,7 @@ public class SubCommand<T> {
|
|||||||
if (!validator.validate(sender, sender, (s, objectArgs) -> {
|
if (!validator.validate(sender, sender, (s, objectArgs) -> {
|
||||||
abstractSWCommand.sendMessage(sender, s, objectArgs);
|
abstractSWCommand.sendMessage(sender, s, objectArgs);
|
||||||
})) {
|
})) {
|
||||||
throw new CommandNoHelpException();
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
objects.add(0, senderFunction.apply(sender));
|
objects.add(0, senderFunction.apply(sender));
|
||||||
|
@ -43,11 +43,13 @@ public class ValidatorCommand extends TestSWCommand {
|
|||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void onError(String sender, @ErrorMessage("Hello World") int error) {
|
public void onError(String sender, @ErrorMessage("Hello World") int error) {
|
||||||
|
System.out.println("onError: " + sender + " " + error);
|
||||||
throw new ExecutionIdentifier("RunOnError");
|
throw new ExecutionIdentifier("RunOnError");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void onError(String sender, double error) {
|
public void onError(String sender, double error) {
|
||||||
|
System.out.println("onError: " + sender + " " + error);
|
||||||
throw new ExecutionIdentifier("RunOnErrorDouble");
|
throw new ExecutionIdentifier("RunOnErrorDouble");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren