Class SpigotSlowBotDisconnectEvent
java.lang.Object
org.bukkit.event.Event
com.lahuca.botsentry.api.event.spigot.SpigotSlowBotDisconnectEvent
- All Implemented Interfaces:
BotSentryEvent
,Cancellable
,SlowBotDisconnectEvent
public class SpigotSlowBotDisconnectEvent
extends org.bukkit.event.Event
implements SlowBotDisconnectEvent
Spigot event for the SlowBotDisconnect event.
Event is passed when a detection method has detected a slow bot and is trying to kick or blacklist the bot.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
Nested classes/interfaces inherited from interface com.lahuca.botsentry.api.event.SlowBotDisconnectEvent
SlowBotDisconnectEvent.DetectionMethod
-
Constructor Summary
ConstructorDescriptionSpigotSlowBotDisconnectEvent
(String ip, boolean blacklisting, SlowBotDisconnectEvent.DetectionMethod detectionMethod) -
Method Summary
Modifier and TypeMethodDescriptionGives the detection method that detected this slow bot.static org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
getIP()
Gives the IP that will be blacklisted or kicked.boolean
Gives if the IP is supposed to be blacklisted or only be kicked.boolean
Retrieves the cancelled state of the event.void
setCancelled
(boolean cancelled) Sets the cancelled state of the event.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
SpigotSlowBotDisconnectEvent
public SpigotSlowBotDisconnectEvent(String ip, boolean blacklisting, SlowBotDisconnectEvent.DetectionMethod detectionMethod)
-
-
Method Details
-
setCancelled
public void setCancelled(boolean cancelled) Sets the cancelled state of the event. The last listener that changes this state will be the one that will affect the event.- Specified by:
setCancelled
in interfaceCancellable
- Parameters:
cancelled
- the state to set
-
isCancelled
public boolean isCancelled()Retrieves the cancelled state of the event. Does not have the be the final state.- Specified by:
isCancelled
in interfaceCancellable
- Returns:
- the state
-
getIP
Gives the IP that will be blacklisted or kicked.- Specified by:
getIP
in interfaceSlowBotDisconnectEvent
- Returns:
- the ip where this event has effect on
-
isBlacklisting
public boolean isBlacklisting()Gives if the IP is supposed to be blacklisted or only be kicked.- Specified by:
isBlacklisting
in interfaceSlowBotDisconnectEvent
- Returns:
- true if the IP will be blacklisted, false if the IP will be kicked only.
-
getDetectionMethod
Gives the detection method that detected this slow bot.- Specified by:
getDetectionMethod
in interfaceSlowBotDisconnectEvent
- Returns:
- the detection method
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-