Class SpongeSlowBotDisconnectEvent
java.lang.Object
org.spongepowered.api.event.impl.AbstractEvent
com.lahuca.botsentry.api.event.sponge.SpongeSlowBotDisconnectEvent
- All Implemented Interfaces:
BotSentryEvent,Cancellable,SlowBotDisconnectEvent,org.spongepowered.api.event.Event
public class SpongeSlowBotDisconnectEvent
extends org.spongepowered.api.event.impl.AbstractEvent
implements SlowBotDisconnectEvent
Sponge 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 -
Field Summary
Fields inherited from class org.spongepowered.api.event.impl.AbstractEvent
currentOrder -
Constructor Summary
ConstructorsConstructorDescriptionSpongeSlowBotDisconnectEvent(String ip, boolean blacklisting, SlowBotDisconnectEvent.DetectionMethod detectionMethod) -
Method Summary
Modifier and TypeMethodDescriptionorg.spongepowered.api.event.cause.CausegetCause()Gives the detection method that detected this slow bot.getIP()Gives the IP that will be blacklisted or kicked.booleanGives if the IP is supposed to be blacklisted or only be kicked.booleanRetrieves the cancelled state of the event.voidsetCancelled(boolean cancelled) Sets the cancelled state of the event.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.spongepowered.api.event.Event
getContext, getSource
-
Constructor Details
-
SpongeSlowBotDisconnectEvent
public SpongeSlowBotDisconnectEvent(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:
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
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
Gives the detection method that detected this slow bot.- Specified by:
getDetectionMethodin interfaceSlowBotDisconnectEvent- Returns:
- the detection method
-
getCause
public org.spongepowered.api.event.cause.Cause getCause()- Specified by:
getCausein interfaceorg.spongepowered.api.event.Event
-