CommandFramework3 #94
@ -180,6 +180,7 @@ public abstract class SWCommand {
|
||||
@Target({ElementType.METHOD})
|
||||
protected @interface Register {
|
||||
String[] value() default {};
|
||||
|
||||
boolean help() default false;
|
||||
}
|
||||
|
||||
@ -187,6 +188,7 @@ public abstract class SWCommand {
|
||||
@Target({ElementType.PARAMETER, ElementType.METHOD})
|
||||
protected @interface Mapper {
|
||||
String value();
|
||||
|
||||
boolean local() default false;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,6 @@ public class SWCommandUtils {
|
||||
addMapper(double.class, Double.class, createMapper(Double::parseDouble, numberCompleter(Double::parseDouble)));
|
||||
addMapper(int.class, Integer.class, createMapper(Integer::parseInt, numberCompleter(Integer::parseInt)));
|
||||
MAPPER_FUNCTIONS.put(String.class.getTypeName(), createMapper(s -> s, Collections::singletonList));
|
||||
MAPPER_FUNCTIONS.put(StringBuilder.class.getTypeName(), createMapper(StringBuilder::new, Collections::singletonList));
|
||||
MAPPER_FUNCTIONS.put(Player.class.getTypeName(), createMapper(Bukkit::getPlayer, s -> Bukkit.getOnlinePlayers().stream().map(Player::getName).collect(Collectors.toList())));
|
||||
MAPPER_FUNCTIONS.put(GameMode.class.getTypeName(), createMapper(s -> {
|
||||
s = s.toLowerCase();
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren