Interface ActionLogger


public interface ActionLogger
Represents the object responsible for handling action logging.
  • Method Details

    • actionBuilder

      @NonNull Action.Builder actionBuilder()
      Returns a new Action.Builder instance
      Returns:
      a new builder
    • getLog

      Deprecated.
      Use queryActions(ActionFilter) or queryActions(ActionFilter, int, int) instead. These methods are more efficient (they don't load the full action log into memory) and allow for pagination.
      Gets a ActionLog instance from the plugin storage.
      Returns:
      a log instance
    • queryActions

      Gets all actions from the action log matching the given filter.

      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 given filter.

      If the filter is null, all actions will be returned.

      Parameters:
      filter - the filter, optional
      pageSize - the size of the page
      pageNumber - 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 by broadcastAction(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

      @NonNull CompletableFuture<Void> submitToStorage(@NonNull Action entry)
      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

      @NonNull CompletableFuture<Void> broadcastAction(@NonNull Action entry)
      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