public class BanCache
extends java.lang.Object
| Constructor and Description |
|---|
BanCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBannedIP(java.lang.String address,
java.lang.String message)
Adds a banned IP to the cache
|
boolean |
addBannedUUID(java.lang.String uuid,
java.lang.String message)
Adds a banned UUID to the cache.
|
boolean |
addBannedUUID(java.util.UUID uuid,
java.lang.String message)
Adds a banned UUID to the cache.
|
void |
addTempBannedUUID(java.lang.String uuid,
java.lang.String message,
java.util.Date unbanDate)
Adds a player to the tempbanned list
|
void |
addTempBannedUUID(java.util.UUID uuid,
java.lang.String message,
java.util.Date unbanDate)
Adds a player to the tempbanned list
|
java.lang.String |
getBanMessage(java.lang.String uuid)
Used to get the particular ban message from a UUID
|
java.lang.String |
getBanMessage(java.util.UUID uuid)
Used to get the particular ban message from a UUID
|
java.util.Set<java.lang.String> |
getBannedPlayers()
Used to fetch a bulk list of all banned players
|
java.lang.String |
getIPBanMessage(java.lang.String address)
Used to get the particular IP ban message from a UUID
|
java.util.Set<java.lang.String> |
getIPBans()
Returns a list of all the banned IPs
|
java.util.Date |
getIPTempBanEndDate(java.lang.String address)
Used to get the date the tempban should be lifted
|
java.util.Date |
getTempBanEndDate(java.lang.String uuid)
Used to get the date the tempban should be lifted
|
java.util.Date |
getTempBanEndDate(java.util.UUID uuid)
Used to get the date the tempban should be lifted
|
boolean |
isIPBanned(java.lang.String address)
Used to determine if an IP is already banned
|
boolean |
isIPTempBanned(java.lang.String address)
Returns if an IP is temp banned
|
boolean |
isTempBanned(java.lang.String uuid)
Used to check if a player is tempbanned
|
boolean |
isTempBanned(java.util.UUID uuid)
Used to check if a player is tempbanned
|
boolean |
isUUIDBanned(java.lang.String uuid)
Used to check if a particular UUID is banned
|
boolean |
isUUIDBanned(java.util.UUID uuid)
Used to check if a particular UUID is banned
|
boolean |
removeBan(java.lang.String uuid)
Used to delete both normal bans and temp bans
|
boolean |
removeBan(java.util.UUID uuid)
Used to delete both normal bans and temp bans
|
void |
tempBanIP(java.lang.String address,
java.lang.String message,
java.util.Date unbanDate)
Used to temp ban and IP address
|
boolean |
unbanIP(java.lang.String address)
Used to unban an IP
|
public boolean addBannedUUID(java.lang.String uuid,
java.lang.String message)
uuid - The uuid to ban (in string form)message - The message to set with the ban (set to null if default should be used)public boolean addBannedUUID(java.util.UUID uuid,
java.lang.String message)
uuid - The uuid to banmessage - The message to set with the ban (set to null if default should be used)public boolean isUUIDBanned(java.lang.String uuid)
uuid - The UUID to check if banned (in string form)public boolean isUUIDBanned(java.util.UUID uuid)
uuid - The UUID to check if bannedpublic java.lang.String getBanMessage(java.lang.String uuid)
uuid - The UUID of the player to get the ban message for (in String form)public java.lang.String getBanMessage(java.util.UUID uuid)
uuid - The UUID of the player to get the ban message forpublic boolean isTempBanned(java.lang.String uuid)
uuid - The uuid of the player to check (in String form)public boolean isTempBanned(java.util.UUID uuid)
uuid - The uuid of the player to check (in String form)public java.util.Date getTempBanEndDate(java.lang.String uuid)
uuid - The uuid of the player to get the tempban datepublic java.util.Date getTempBanEndDate(java.util.UUID uuid)
uuid - The uuid of the player to get the tempban datepublic void addTempBannedUUID(java.lang.String uuid,
java.lang.String message,
java.util.Date unbanDate)
uuid - The uuid to ban (in string form)message - The message to tie with it (set to null to use default)unbanDate - The date to unban the player atpublic void addTempBannedUUID(java.util.UUID uuid,
java.lang.String message,
java.util.Date unbanDate)
uuid - The uuid to banmessage - The message to tie with it (set to null to use default)unbanDate - The date to unban the player atpublic boolean removeBan(java.lang.String uuid)
uuid - The uuid to unban (In string form)public boolean removeBan(java.util.UUID uuid)
uuid - The uuid to unban (In string form)public java.util.Set<java.lang.String> getBannedPlayers()
public void addBannedIP(java.lang.String address,
java.lang.String message)
address - The IP address to be bannedmessage - The message to be tied with the ban (optional)public boolean isIPBanned(java.lang.String address)
address - The address to check forpublic boolean isIPTempBanned(java.lang.String address)
address - The ip in questionpublic void tempBanIP(java.lang.String address,
java.lang.String message,
java.util.Date unbanDate)
address - The address to temp banmessage - The message to go with the ban (optional)unbanDate - The unban date of the playerpublic boolean unbanIP(java.lang.String address)
address - The IP to unbanpublic java.lang.String getIPBanMessage(java.lang.String address)
uuid - The UUID of the player to get the ban message for (in String form)public java.util.Date getIPTempBanEndDate(java.lang.String address)
uuid - The uuid of the player to get the tempban datepublic java.util.Set<java.lang.String> getIPBans()