Actions
Actions are a list of things that are executed when an item is clicked.
Creating Actions
Section titled “Creating Actions”Actions follow the below format, which is a MAP of actions that will be run. Each entry needs its unique string identifier. In this example below. It has two actions defined within the "actions": {} section: action_1 and action_2.
"actions": { "action_1": { // Action options... }, "action_2": { // Action options... }}Action Options
Section titled “Action Options”Type (required)
Section titled “Type (required)”The type of action that this entry is. A list of types can be found in Action Types.
"type": "MESSAGE"Additional Options
Section titled “Additional Options”Additional options are available depending on the type of action used. See Action Types for each type’s additional options.
Action Types
Section titled “Action Types”These are the available Action Types along with a short description and the required mods, if any.
| Identifier | Description | Required Mods |
|---|---|---|
| MESSAGE | Send a message to the player | |
| COMMAND_CONSOLE | Run a command as the console | |
| COMMAND_PLAYER | Run a command as the player | |
| BROADCAST | Broadcast a message to all players | |
| PLAYSOUND | Play a sound to the player | |
| CLOSE_GUI | Close this GUI for the player | |
| NEXT_PAGE | Move to the next page of the GUI. Requires the GUI to be paginated | |
| PREVIOUS_PAGE | Move to the previous page of the GUI. Requires the GUI to be paginated |
Message Action
Section titled “Message Action”Sends a message to the player, parsed by Placeholder Services. Uses MiniMessage formatting!
"type": "MESSAGE","message": ["<blue>This is a message to the player!"]Command Console Action
Section titled “Command Console Action”Runs a command as the console, parsed by Placeholder Services.
"type": "COMMAND_CONSOLE","commands": ["give %player% diamond 1"]Command Player Action
Section titled “Command Player Action”Runs a command as the player, parsed by Placeholder Services.
"type": "COMMAND_PLAYER","commands": ["say Hello, I am %player%!"],"permission_level": 1 // Optional. Permission level the command is ran asBroadcast Action
Section titled “Broadcast Action”Broadcasts a message to all players, parsed by Placeholder Services. Uses MiniMessage formatting!
"type": "BROADCAST","message": ["<green>%player% has clicked the special item!"]PlaySound Action
Section titled “PlaySound Action”Plays a sound to the player. The sound is sent as a packet, so other players will not hear it.
"type": "PLAYSOUND","sound": "minecraft:entity.player.levelup","source": "MASTER", // Optional, defaults to MASTER. Valid sources: MASTER, MUSIC, RECORD, WEATHER, BLOCKS, HOSTILE, NEUTRAL, PLAYERS, AMBIENT, VOICE"volume": 1.0, // Optional, defaults to 1.0"pitch": 1.0 // Optional, defaults to 1.0Close GUI Action
Section titled “Close GUI Action”Closes the current SkiesCrate menu for the player.
"type": "CLOSE_GUI"Next Page Action
Section titled “Next Page Action”Moves to the next page of the current SkiesCrate menu. Requires the menu to be paginated.
"type": "NEXT_PAGE"Previous Page Action
Section titled “Previous Page Action”Moves to the previous page of the current SkiesCrate menu. Requires the menu to be paginated.
"type": "PREVIOUS_PAGE"