Fix SWCommand add HelpRegisters
Dieser Commit ist enthalten in:
Ursprung
b08855f000
Commit
c9e8b31aa4
@ -87,13 +87,16 @@ public abstract class SWCommand {
|
|||||||
SWCommandUtils.addMapper(anno.value(), typeMapper);
|
SWCommandUtils.addMapper(anno.value(), typeMapper);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
addMapper(ClassMapper.class, method, i -> i != 0, false, TypeMapper.class, (anno, typeMapper) -> {
|
addMapper(ClassMapper.class, method, i -> i == 0, false, TypeMapper.class, (anno, typeMapper) -> {
|
||||||
SWCommandUtils.addMapper(anno.value().getTypeName(), typeMapper);
|
SWCommandUtils.addMapper(anno.value().getTypeName(), typeMapper);
|
||||||
});
|
});
|
||||||
add(Register.class, method, i -> i == 2, true, null, (anno, parameters) -> {
|
add(Register.class, method, i -> i > 2, true, null, (anno, parameters) -> {
|
||||||
if (!anno.help()) {
|
if (!anno.help()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (parameters.length != 2) {
|
||||||
|
Bukkit.getLogger().log(Level.WARNING, "The method '" + method.toString() + "' is lacking parameters or has too many");
|
||||||
|
}
|
||||||
if (!parameters[parameters.length - 1].isVarArgs()) {
|
if (!parameters[parameters.length - 1].isVarArgs()) {
|
||||||
Bukkit.getLogger().log(Level.WARNING, "The method '" + method.toString() + "' is lacking the varArgs parameters as last Argument");
|
Bukkit.getLogger().log(Level.WARNING, "The method '" + method.toString() + "' is lacking the varArgs parameters as last Argument");
|
||||||
return;
|
return;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren