Class QueuedAction

java.lang.Object
net.gcnt.additionsplus.api.QueuedAction

public class QueuedAction extends Object
Class that contains all information about a queued action.
Since:
2.4.0
  • Constructor Details

  • Method Details

    • placeholders

      public QueuedAction placeholders(ActionSender user)
      Use the same queued action for a different user, and replace the placeholders for the new user.
      Parameters:
      user - User to replace the placeholders for
      Returns:
      Same queued action with a different placeholder target.
    • copy

      public QueuedAction copy(ActionSender sender)
      Copy the entire queued action but change the action sender.
      Parameters:
      sender - New action sender.
      Returns:
      Copy of the queued action with a different sender.
    • getSender

      public ActionSender getSender()
      Get the sender of the action.
      Returns:
      ActionSender sender of the action.
    • setSender

      public void setSender(ActionSender sender)
      Set the sender of the queued action.
      Parameters:
      sender - ActionSender sender of the action.
    • getOriginalActionString

      public String getOriginalActionString()
      Set the original, raw action string, without placeholders and colors being replaced.
      Returns:
      Original, raw action string.
    • getValue

      public String getValue()
      Get the raw value of this action, with all action tags being removed.
      Returns:
      Raw value of the action string, without action tags.
    • getColoredValue

      public String getColoredValue()
      Get the colored value of this action, with all tags being removed.
      Returns:
      Colored value of the action string, without action tags.
    • getArguments

      public String[] getArguments()
      Get a list of arguments that were found in the main action.
      Returns:
      String array with action arguments.
    • getAction

      @Nullable public Action getAction()
      Get the Action that has been queued. This can be null if a custom action was queued instead.
      Returns:
      Action if queued, null if custom action was queued.
    • getCustomAction

      @Nullable public CustomAction getCustomAction()
      Get the Custom Action that has been queued. This can be null if a plugin action was queued instead.
      Returns:
      Action if queued, null if plugin action was queued.