SteamWar/SpigotCore
Archiviert
13
0

CommandFramework3 #94

Manuell gemergt
Zeanon hat 71 Commits von CommandFramework3 nach master 2021-03-30 21:15:40 +02:00 zusammengeführt
Nur Änderungen aus Commit db8d9697e6 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -79,7 +79,7 @@ public abstract class SWCommand {
});
for (Method method : getClass().getDeclaredMethods()) {
addMapper(Mapper.class, method, i -> i != 0, false, TypeMapper.class, (anno, typeMapper) -> {
addMapper(Mapper.class, method, i -> i == 0, false, TypeMapper.class, (anno, typeMapper) -> {
if (anno.local()) {
localTypeMapper.put(anno.value(), typeMapper);
} else {
@ -89,7 +89,7 @@ public abstract class SWCommand {
addMapper(ClassMapper.class, method, i -> i != 0, false, TypeMapper.class, (anno, 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()) {
return;
}
@ -103,7 +103,7 @@ public abstract class SWCommand {
});
}
for (Method method : getClass().getDeclaredMethods()) {
add(Register.class, method, i -> i == 0, true, null, (anno, parameters) -> {
add(Register.class, method, i -> i > 0, true, null, (anno, parameters) -> {
if (anno.help()) {
return;
}
@ -135,7 +135,7 @@ public abstract class SWCommand {
}
Parameter[] parameters = method.getParameters();
if (parameterTester.test(parameters.length)) {
if (!parameterTester.test(parameters.length)) {
return;
}
if (firstParameter && !CommandSender.class.isAssignableFrom(parameters[0].getType())) {