Class VelocitySlowBotDisconnectEvent
- java.lang.Object
-
- com.lahuca.botsentry.api.event.velocity.VelocitySlowBotDisconnectEvent
-
- All Implemented Interfaces:
BotSentryEvent,Cancellable,SlowBotDisconnectEvent
public class VelocitySlowBotDisconnectEvent extends java.lang.Object implements SlowBotDisconnectEvent
Velocity 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 interface com.lahuca.botsentry.api.event.SlowBotDisconnectEvent
SlowBotDisconnectEvent.DetectionMethod
-
-
Constructor Summary
Constructors Constructor Description VelocitySlowBotDisconnectEvent(java.lang.String ip, boolean blacklisting, SlowBotDisconnectEvent.DetectionMethod detectionMethod)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SlowBotDisconnectEvent.DetectionMethodgetDetectionMethod()Gives the detection method that detected this slow bot.java.lang.StringgetIP()Gives the IP that will be blacklisted or kicked.booleanisBlacklisting()Gives if the IP is supposed to be blacklisted or only be kicked.booleanisCancelled()Retrieves the cancelled state of the event.voidsetCancelled(boolean cancelled)Sets the cancelled state of the event.
-
-
-
Constructor Detail
-
VelocitySlowBotDisconnectEvent
public VelocitySlowBotDisconnectEvent(java.lang.String ip, boolean blacklisting, SlowBotDisconnectEvent.DetectionMethod detectionMethod)
-
-
Method Detail
-
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:
setCancelledin 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:
isCancelledin interfaceCancellable- Returns:
- the state
-
getIP
public java.lang.String getIP()
Gives the IP that will be blacklisted or kicked.- Specified by:
getIPin 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:
isBlacklistingin interfaceSlowBotDisconnectEvent- Returns:
- true if the IP will be blacklisted, false if the IP will be kicked only.
-
getDetectionMethod
public SlowBotDisconnectEvent.DetectionMethod getDetectionMethod()
Gives the detection method that detected this slow bot.- Specified by:
getDetectionMethodin interfaceSlowBotDisconnectEvent- Returns:
- the detection method
-
-