-
Notifications
You must be signed in to change notification settings - Fork 0
Stack
The selection stack allows users to store multiple lists of players and use them with commands.
When a list of players is pushed onto the stack, it will be the list used with the next command.
See player selectors on how to use the stack with commands.
Additionally, the @stack RA option can be enabled to select players on the stack in the Remote Admin GUI.
Execute the raOpt show @stack command to make the option visible.
Example:
-
stackPush @a- pushes all players onto the stack -
stackPush @s- pushes the sender onto the stack (becomes the first list, index 0) -
give @stack 0- gives a janitor keycard to the players in the first list (@s)The first list is popped (removed) from the stack. List
@abecomes first.
Important
A stack may only contain 1024 lists. There is no limit to how many players an individual list can contain, however, one list cannot contain the same player twice.
| Name | Description |
|---|---|
| stackClear | Removes all lists from the selection stack |
| stackDuplicate | Duplicates the given lists, pushing them onto the stack |
| stackList | Shows all lists of players. The topmost (#0) value is shown last |
| stackPop | Removes the topmost (or at given index) list from the stack |
| stackPush | Pushes the given players onto the selection stack |
| stackReverse | Reverses the order of the lists, making the last list the first |
Note
Duplication cannot be performed if the amount of list(s) to add would overflow the max stack size of 1024
If no index is specified, the topmost list is duplicated.
all or * will copy the entire stack, doubling its size.
first or f or top or t - same as if no index is specified.
Multiple numeric indexes can be specified at once, separated by any of the following symbols: .,;_+-
The order of added lists will depend on the order which indexes were specified, the last given list landing on the top of the stack.
Index 0 is the topmost (first) list, 1 is second, etc.
Example: stackDuplicate 0,3,4,2 - pushes the first, fourth, fifth, and finally the third list.