Interface ActionLogger
-
Method Summary
Modifier and TypeMethodDescriptionReturns a newAction.BuilderinstancebroadcastAction(@NonNull Action entry) Submits a logged action to LuckPerms and broadcasts it to administrators.getLog()Deprecated.queryActions(@NonNull ActionFilter filter) Gets all actions from the action log matching the givenfilter.queryActions(@NonNull ActionFilter filter, int pageSize, int pageNumber) Gets a page of actions from the action log matching the givenfilter.Submits a logged action to LuckPerms.submitToStorage(@NonNull Action entry) Submits a logged action to LuckPerms and persists it in the storage backend.
-
Method Details
-
actionBuilder
@NonNull Action.Builder actionBuilder()Returns a newAction.Builderinstance- Returns:
- a new builder
-
getLog
Deprecated.UsequeryActions(ActionFilter)orqueryActions(ActionFilter, int, int)instead. These methods are more efficient (they don't load the full action log into memory) and allow for pagination.Gets aActionLoginstance from the plugin storage.- Returns:
- a log instance
-
queryActions
Gets all actions from the action log matching the givenfilter.If the filter is
null, all actions will be returned.Unlike
queryActions(ActionFilter, int, int), this method does not implement any pagination and will return all entries at once.- Parameters:
filter- the filter, optional- Returns:
- the actions
- Since:
- 5.5
-
queryActions
@NonNull CompletableFuture<Page<Action>> queryActions(@NonNull ActionFilter filter, int pageSize, int pageNumber) Gets a page of actions from the action log matching the givenfilter.If the filter is
null, all actions will be returned.- Parameters:
filter- the filter, optionalpageSize- the size of the pagepageNumber- the page number- Returns:
- the page of actions
- Since:
- 5.5
-
submit
Submits a logged action to LuckPerms.This method submits the action to the storage provider to be persisted in the action log. It also broadcasts it to administrator players on the current instance and to admins on other connected servers if a messaging service is configured.
It is roughly equivalent to calling
submitToStorage(Action)followed bybroadcastAction(Action), however using this method is preferred to making the calls individually.If you want to submit an action log entry but don't know which method to pick, use this one.
- Parameters:
entry- the entry to submit- Returns:
- a future which will complete when the action is submitted
-
submitToStorage
Submits a logged action to LuckPerms and persists it in the storage backend.This method does not broadcast the action or send it through the messaging service.
- Parameters:
entry- the entry to submit- Returns:
- a future which will complete when the action is submitted
-
broadcastAction
Submits a logged action to LuckPerms and broadcasts it to administrators.The broadcast is made to administrator players on the current instance and to admins on other connected servers if a messaging service is configured.
This method does not save the action to the plugin storage backend.
- Parameters:
entry- the entry to submit- Returns:
- a future which will complete when the action is broadcasted
-
queryActions(ActionFilter)orqueryActions(ActionFilter, int, int)instead.