Simplify LinkageType
Dieser Commit ist enthalten in:
Ursprung
65891d52b4
Commit
bbfd2509a0
@ -35,12 +35,12 @@ import java.util.function.Predicate;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Getter
|
@Getter
|
||||||
public enum LinkageType {
|
public enum LinkageType {
|
||||||
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)),
|
|
||||||
COMMAND(-1, false, SWCommand.class::isAssignableFrom),
|
COMMAND(-1, false, SWCommand.class::isAssignableFrom),
|
||||||
PLAIN(1, false, clazz -> true),
|
LINK(0, false, Enable.class::isAssignableFrom, o -> ((Enable) o).enable()),
|
||||||
UNLINK(0, true, Disable.class::isAssignableFrom, o -> ((Disable) o).disable()),
|
UNLINK(0, true, Disable.class::isAssignableFrom, o -> ((Disable) o).disable()),
|
||||||
LINK(0, false, Enable.class::isAssignableFrom, o -> ((Enable) o).enable());
|
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));
|
||||||
|
|
||||||
private final int order;
|
private final int order;
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren