Class VerboseHandler

java.lang.Object
me.lucko.luckperms.common.verbose.VerboseHandler
All Implemented Interfaces:
AutoCloseable

public class VerboseHandler extends Object implements AutoCloseable
Accepts VerboseEvents and passes them onto registered VerboseListeners.
  • Constructor Details

  • Method Details

    • offerPermissionCheckEvent

      public void offerPermissionCheckEvent(CheckOrigin origin, VerboseCheckTarget checkTarget, net.luckperms.api.query.QueryOptions checkQueryOptions, String permission, TristateResult result)
      Offers permission check data to the handler, to be eventually passed onto listeners.

      The check data is added to a queue to be processed later, to avoid blocking the main thread each time a permission check is made.

      Parameters:
      origin - the origin of the check
      checkTarget - the target of the permission check
      checkQueryOptions - the query options used for the check
      permission - the permission which was checked for
      result - the result of the permission check
    • offerMetaCheckEvent

      public void offerMetaCheckEvent(CheckOrigin origin, VerboseCheckTarget checkTarget, net.luckperms.api.query.QueryOptions checkQueryOptions, String key, StringResult<?> result)
      Offers meta check data to the handler, to be eventually passed onto listeners.

      The check data is added to a queue to be processed later, to avoid blocking the main thread each time a meta check is made.

      Parameters:
      origin - the origin of the check
      checkTarget - the target of the meta check
      checkQueryOptions - the query options used for the check
      key - the meta key which was checked for
      result - the result of the meta check
    • registerListener

      public void registerListener(Sender sender, VerboseFilter filter, boolean notify)
      Registers a new listener for the given player.
      Parameters:
      sender - the sender to notify, if notify is true
      filter - the filter string
      notify - if the sender should be notified in chat on each check
    • unregisterListener

      public VerboseListener unregisterListener(Sender sender)
      Removes a listener for a given player
      Parameters:
      sender - the sender
      Returns:
      the existing listener, if one was actually registered
    • flush

      public void flush()
      Flushes the pending events to listeners.
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable