geforkt von Mirrors/Paper
Add WhitelistToggleEvent
Dieser Commit ist enthalten in:
Ursprung
719f0a0a7e
Commit
13d4e540cf
@ -0,0 +1,42 @@
|
||||
package com.destroystokyo.paper.event.server;
|
||||
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
/**
|
||||
* This event is fired when whitelist is toggled
|
||||
*
|
||||
* @author Mark Vainomaa
|
||||
*/
|
||||
@NullMarked
|
||||
public class WhitelistToggleEvent extends Event {
|
||||
|
||||
private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
|
||||
private final boolean enabled;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public WhitelistToggleEvent(final boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether whitelist is going to be enabled or not
|
||||
*
|
||||
* @return Whether whitelist is going to be enabled or not
|
||||
*/
|
||||
public boolean isEnabled() {
|
||||
return this.enabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return HANDLER_LIST;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return HANDLER_LIST;
|
||||
}
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren