Class VerboseHandler
java.lang.Object
me.lucko.luckperms.common.verbose.VerboseHandler
- All Implemented Interfaces:
AutoCloseable
Accepts
VerboseEvents and passes them onto registered VerboseListeners.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()Flushes the pending events to listeners.voidofferMetaCheckEvent(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.voidofferPermissionCheckEvent(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.voidregisterListener(Sender sender, VerboseFilter filter, boolean notify) Registers a new listener for the given player.unregisterListener(Sender sender) Removes a listener for a given player
-
Constructor Details
-
VerboseHandler
-
-
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 checkcheckTarget- the target of the permission checkcheckQueryOptions- the query options used for the checkpermission- the permission which was checked forresult- 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 checkcheckTarget- the target of the meta checkcheckQueryOptions- the query options used for the checkkey- the meta key which was checked forresult- the result of the meta check
-
registerListener
Registers a new listener for the given player.- Parameters:
sender- the sender to notify, if notify is truefilter- the filter stringnotify- if the sender should be notified in chat on each check
-
unregisterListener
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:
closein interfaceAutoCloseable
-