Package com.sk89q.worldguard.blacklist
Class Blacklist
java.lang.Object
com.sk89q.worldguard.blacklist.Blacklist
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
check
(BlacklistEvent event, boolean forceRepeat, boolean silent) Method to handle the event.int
Get the number of individual items that have blacklist entries.Get the last event.Get the log.com.google.common.cache.LoadingCache
<String, com.sk89q.worldguard.blacklist.TrackedEvent> boolean
isEmpty()
Returns whether the list is empty.boolean
Returns whether the blacklist is used as a whitelist.void
Load the blacklist.void
notify
(BlacklistEvent event, String comment) Notify administrators.
-
Constructor Details
-
Blacklist
public Blacklist(boolean useAsWhitelist)
-
-
Method Details
-
isEmpty
public boolean isEmpty()Returns whether the list is empty.- Returns:
- whether the blacklist is empty
-
getItemCount
public int getItemCount()Get the number of individual items that have blacklist entries.- Returns:
- The number of items in the blacklist
-
isWhitelist
public boolean isWhitelist()Returns whether the blacklist is used as a whitelist.- Returns:
- whether the blacklist is be used as a whitelist
-
getLogger
Get the log.- Returns:
- The logger used in this blacklist
-
check
Method to handle the event.- Parameters:
event
- The event to checkforceRepeat
- Whether to force quickly repeating notificationssilent
- Whether to force-deny notifications- Returns:
- Whether the event is allowed
-
load
Load the blacklist.- Parameters:
file
- The file to load from- Throws:
IOException
- if an error occurred reading from the file
-
getLastEvent
Get the last event.- Returns:
- The last event
-
notify
Notify administrators.- Parameters:
event
- The event to notify aboutcomment
- The comment to notify with
-
getRepeatingEventCache
public com.google.common.cache.LoadingCache<String,com.sk89q.worldguard.blacklist.TrackedEvent> getRepeatingEventCache()
-