Class Blacklist

java.lang.Object
com.sk89q.worldguard.blacklist.Blacklist

public class Blacklist extends Object
  • 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

      public BlacklistLoggerHandler getLogger()
      Get the log.
      Returns:
      The logger used in this blacklist
    • check

      public boolean check(BlacklistEvent event, boolean forceRepeat, boolean silent)
      Method to handle the event.
      Parameters:
      event - The event to check
      forceRepeat - Whether to force quickly repeating notifications
      silent - Whether to force-deny notifications
      Returns:
      Whether the event is allowed
    • load

      public void load(File file) throws IOException
      Load the blacklist.
      Parameters:
      file - The file to load from
      Throws:
      IOException - if an error occurred reading from the file
    • getLastEvent

      public BlacklistEvent getLastEvent()
      Get the last event.
      Returns:
      The last event
    • notify

      public void notify(BlacklistEvent event, String comment)
      Notify administrators.
      Parameters:
      event - The event to notify about
      comment - The comment to notify with
    • getRepeatingEventCache

      public com.google.common.cache.LoadingCache<String,com.sk89q.worldguard.blacklist.TrackedEvent> getRepeatingEventCache()