Simplify LinkageType
Dieser Commit ist enthalten in:
Ursprung
bbfd2509a0
Commit
c1041a8f4e
@ -40,7 +40,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Linked(LinkageType.COMMAND)
|
||||
@Linked(LinkageType.LINK)
|
||||
@Linked(LinkageType.ENABLE_LINK)
|
||||
public class TPSLimitCommand extends SWCommand implements Enable {
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
|
@ -36,8 +36,8 @@ import java.util.function.Predicate;
|
||||
@Getter
|
||||
public enum LinkageType {
|
||||
COMMAND(-1, false, SWCommand.class::isAssignableFrom),
|
||||
LINK(0, false, Enable.class::isAssignableFrom, o -> ((Enable) o).enable()),
|
||||
UNLINK(0, true, Disable.class::isAssignableFrom, o -> ((Disable) o).disable()),
|
||||
ENABLE_LINK(0, false, Enable.class::isAssignableFrom, o -> ((Enable) o).enable()),
|
||||
DISABLE_LINK(0, true, Disable.class::isAssignableFrom, o -> ((Disable) o).disable()),
|
||||
PLAIN(1, false, clazz -> true),
|
||||
LISTENER(2, false, Listener.class::isAssignableFrom, o -> Bukkit.getPluginManager().registerEvents((Listener) o, BauSystem.getInstance())),
|
||||
UNLINK_LISTENER(2, true, Listener.class::isAssignableFrom, o -> HandlerList.unregisterAll((Listener) o));
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren