Package com.sk89q.worldguard.blacklist
Class Blacklist
java.lang.Object
com.sk89q.worldguard.blacklist.Blacklist
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck(BlacklistEvent event, boolean forceRepeat, boolean silent)Method to handle the event.intGet 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>booleanisEmpty()Returns whether the list is empty.booleanReturns whether the blacklist is used as a whitelist.voidLoad the blacklist.voidnotify(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()
-