Fix design stuff
Dieser Commit ist enthalten in:
Ursprung
8be46cd7bc
Commit
9436616440
@ -189,5 +189,4 @@ public abstract class SWCommand {
|
||||
protected @interface LocalMapper {
|
||||
String value();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -127,17 +127,7 @@ public class SWCommandUtils {
|
||||
}
|
||||
|
||||
public static <T> TypeMapper<T> createMapper(Function<String, T> mapper, Function<String, List<String>> tabCompleter) {
|
||||
return new TypeMapper<T>() {
|
||||
@Override
|
||||
public T map(String s) {
|
||||
return mapper.apply(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tabCompletes(CommandSender commandSender, String s) {
|
||||
return tabCompleter.apply(s);
|
||||
}
|
||||
};
|
||||
return createMapper(mapper, (commandSender, s) -> tabCompleter.apply(s));
|
||||
}
|
||||
|
||||
public static <T> TypeMapper<T> createMapper(Function<String, T> mapper, BiFunction<CommandSender, String, List<String>> tabCompleter) {
|
||||
@ -169,5 +159,4 @@ public class SWCommandUtils {
|
||||
if (method.getAnnotations().length != 1) return null;
|
||||
return method.getAnnotation(annotation);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -134,5 +134,4 @@ class SubCommand {
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren