Package com.lahuca.botsentry.api
Class AntiBotSentryMode
java.lang.Object
com.lahuca.botsentry.api.AntiBotSentryMode
Class for handling and retrieving information about AntiBot Mode.
-
Method Summary
Modifier and TypeMethodDescriptionint
Gives the amount of blacklisted IPs in the current AntiBot Mode session.long
Gives the time in milliseconds (time fromSystem.currentTimeMillis()
) when the AntiBot Mode was started.boolean
Gives the current AntiBot Mode status.void
setAntiBotMode
(boolean enabled) Toggles the AntiBot Mode state.
-
Method Details
-
isAntiBotMode
public boolean isAntiBotMode()Gives the current AntiBot Mode status.- Returns:
- True: enabled, false: disabled.
-
setAntiBotMode
public void setAntiBotMode(boolean enabled) Toggles the AntiBot Mode state. It handles everything according to the state given: file saving, data writing, etc.- Parameters:
enabled
- The state to set the AntiBot Mode to.
-
getStartTime
public long getStartTime()Gives the time in milliseconds (time fromSystem.currentTimeMillis()
) when the AntiBot Mode was started. If AntiBot Mode is disabled, it will return a value of -1.- Returns:
- The AntiBot Mode start time in milliseconds or -1.
-
getBlacklistedIPs
public int getBlacklistedIPs()Gives the amount of blacklisted IPs in the current AntiBot Mode session. If AntiBot Mode is disabled, it will return a value of -1.- Returns:
- The amount of blacklisted IPs or -1.
-