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