SteamWar/SpigotCore
Archiviert
13
0

Fix design stuff

Dieser Commit ist enthalten in:
yoyosource 2021-03-29 22:57:00 +02:00
Ursprung 8be46cd7bc
Commit 9436616440
3 geänderte Dateien mit 1 neuen und 14 gelöschten Zeilen

Datei anzeigen

@ -189,5 +189,4 @@ public abstract class SWCommand {
protected @interface LocalMapper { protected @interface LocalMapper {
String value(); String value();
} }
} }

Datei anzeigen

@ -127,17 +127,7 @@ public class SWCommandUtils {
} }
public static <T> TypeMapper<T> createMapper(Function<String, T> mapper, Function<String, List<String>> tabCompleter) { public static <T> TypeMapper<T> createMapper(Function<String, T> mapper, Function<String, List<String>> tabCompleter) {
return new TypeMapper<T>() { return createMapper(mapper, (commandSender, s) -> tabCompleter.apply(s));
@Override
public T map(String s) {
return mapper.apply(s);
}
@Override
public List<String> tabCompletes(CommandSender commandSender, String s) {
return tabCompleter.apply(s);
}
};
} }
public static <T> TypeMapper<T> createMapper(Function<String, T> mapper, BiFunction<CommandSender, String, List<String>> tabCompleter) { 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; if (method.getAnnotations().length != 1) return null;
return method.getAnnotation(annotation); return method.getAnnotation(annotation);
} }
} }

Datei anzeigen

@ -134,5 +134,4 @@ class SubCommand {
} }
return Collections.emptyList(); return Collections.emptyList();
} }
} }