Package net.gcnt.additionsplus.api
Class QueuedAction
java.lang.Object
net.gcnt.additionsplus.api.QueuedAction
Class that contains all information about a queued action.
- Since:
- 2.4.0
-
Constructor Summary
ConstructorDescriptionQueuedAction(ActionSender sender, String originalActionString, CustomAction customAction)
QueuedAction(ActionSender sender, String originalActionString, Action action)
-
Method Summary
Modifier and TypeMethodDescriptioncopy(ActionSender sender)
Copy the entire queued action but change the action sender.Get the Action that has been queued.String[]
Get a list of arguments that were found in the main action.Get the colored value of this action, with all tags being removed.Get the Custom Action that has been queued.Set the original, raw action string, without placeholders and colors being replaced.Get the sender of the action.getValue()
Get the raw value of this action, with all action tags being removed.placeholders(ActionSender user)
Use the same queued action for a different user, and replace the placeholders for the new user.void
setSender(ActionSender sender)
Set the sender of the queued action.
-
Constructor Details
-
QueuedAction
-
QueuedAction
-
-
Method Details
-
placeholders
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
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
Get the sender of the action.- Returns:
ActionSender
sender of the action.
-
setSender
Set the sender of the queued action.- Parameters:
sender
-ActionSender
sender of the action.
-
getOriginalActionString
Set the original, raw action string, without placeholders and colors being replaced.- Returns:
- Original, raw action 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
Get the colored value of this action, with all tags being removed.- Returns:
- Colored value of the action string, without action tags.
-
getArguments
Get a list of arguments that were found in the main action.- Returns:
String
array with action arguments.
-
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
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.
-