☢️Actions
Actions that can be performed after a requirement
With a requirement, you can define actions for both success and failure. Here are the actions that can be performed.
Example: You will need to create an action list like this:
success:
- type: player_command
commands:
- "firstcommand"
- "seconds commands %player%"
- type: console_command
commands:
- "firstcommand"
- "seconds commands %player%"
- type: message
messages:
- "firstcommand"
- "seconds commands %player%"
You can add a delay, in ticks, for each item in the list below. Do it like this:
success:
- type: player_command
delay: 10 # 10 ticks
commands:
- "firstcommand"
- "seconds commands %player%"
player command
player command
- type: player command
commands:
- "firstcommand"
- "seconds commands %player%"
command-in-chat: false # false by default
Executes commands as the player. You can also send the command in the player's chat.
random player command
random player command
- type: random_player_command
amount: 1 # Default value
commands:
- "firstcommand"
- "seconds commands %player%"
command-in-chat: false # false by default
Executes random commands as the player. You can also send the command in the player's chat.
This feature is only available with zMenu+ !
console command
console command
- type: console_command
commands:
- "firstcommand"
- "seconds commands %player%"
Executes commands as the console.
random console command
random console command
- type: random_console_command
amount: 1 # Default value
commands:
- "firstcommand"
- "seconds commands %player%"
Execute random commands from the list.
This feature is only available with zMenu+ !
player command as op
player command as op
- type: player command as op
commands:
- <command>
Allows the execution of a command while being op.
Attention, this action will give all the permissions to the player while they execute the command. Please be careful when using this action.
message
message
- type: message
messages:
- "my message"
- "my second messages"
mini-message: true # true by default
Sends a message to the player. You can use placeholders, color codes, and format codes. The MiniMessage format is enabled by default if your server supports it.
broadcast
broadcast
- type: broadcast
messages:
- "my name %receiver%"
- "my second message send by %sender%"
mini-message: true # true by default
requirements:
- type: permission
permission: "admin.use"
Sends a message to all online players. You can use placeholders, color codes, and format codes. The MiniMessage format is enabled by default if your server supports it.
%sender%
is the name of the player sending the broadcast
%receiver%
is the name of the player who will receive the message.
You can set a list of requirements to send a message to certain players.
chat
chat
- type: chat
messages:
- "my message"
Sends messages on behalf of the player. You can use placeholders, color codes, and format codes. MiniMessage format is enabled by default if your server supports it.
close
close
- type: close
Closes the player's inventory.
inventory
inventory
- type: inventory
inventory: <inventory name>
plugin: <plugin name>
page: <page>
arguments: <argument list>
Opens an inventory.
connect
connect
- type: connect
server: <server name>
Allows sending the player to another server, only works with BungeeCord and Velocity.
sound
sound
- type: sound
sound: <xsound>
pitch: <sound pitch> # 1.0f by default
volume: <sound volume> # 1.0f by default
Send a sound to a player, you must use XSound for sound.
broadcast sound
broadcast sound
- type: broadcast_sound
sound: <xsound>
pitch: <sound pitch> # 1.0f by default
volume: <sound volume> # 1.0f by default
Send a sound to the online players, you must use XSound for sound.
data
data
- type: data
action: <SET/REMOVE/ADD/SUBTRACT>
key: <data key>
value: <data value>
seconds: <expire seconds> # 0 by default
math: <true/false>
Update player data.
You can use mathematical expressions if you set math to true, this allows you to do more complex actions. Work only with ADD and SUBTRACT.
refresh
refresh
- type: refresh
Refresh current button. Works only in click requirement.
If you update the status of a player with orders, to be sure that the inventory update is done correctly, you must put a delay of 1 tick.
refresh inventory
refresh inventory
- type: refresh inventory
Refreshes the currently open inventory.
back
back
- type: back
Return to previous inventory.
shopkeeper
shopkeeper
- type: shopkeeper
name: <shopkeeper name>
Open a Shopkeeper trading inventory
book
book
- type: book
author: "Maxlego08" # Book author
title: "&cTest" # Book title
lines: # Book pages
1: # First page
- ' #34ebe8zMenu'
- ''
- ''
- '<hover:show_text:"#34eba8Open an url !"><click:open_url:"https://minecraft-inventory-builder.com/">#f0af24Open URL<reset>'
Opens a book for the player. You can specify the title, author, and pages of the book.
actionbar
actionbar
- type: actionbar
message: "my message"
minimessage: true # true by default
Allows you to send a message in the action bar of the player. You can use placeholders and color/format codes here. MiniMessage format is enabled by default if your server supports it.
withdraw
withdraw
- type: withdraw
amount: <amount>
currency: <currency name>
economy: <economy name> # Only the zEssentials, CoinsEngine and EcoBits plugins need this
Allows you to withdraw money from the player’s account. Works with the BeastTokens, Vault, PlayerPoints, ElementalTokens, ElementalGems, Level, Experience, zEssentials, EcoBits, CoinsEngine and VotingPlugin. CurrenciesAPI : https://github.com/Traqueur-dev/CurrenciesAPI
deposit
deposit
- type: deposit
amount: <amount>
currency: <currency name>
economy: <economy name> # Only the zEssentials, CoinsEngine and EcoBits plugins need this
Allows you to deposit money from the player’s account. Works with the BeastTokens, Vault, PlayerPoints, ElementalTokens, ElementalGems, Level, Experience, zEssentials, EcoBits, CoinsEngine and VotingPlugin. CurrenciesAPI : https://github.com/Traqueur-dev/CurrenciesAPI
title
title
- type: title
title: <title>
subtitle: <sub title>
start: <start in milliseconds>
duration: <duration in milliseconds>
end: <end in milliseconds>
Send a title. You can use placeholders and color/format codes here. MiniMessage format is enabled by default if your server supports it.
teleport
teleport
- type: teleport
world: <world> # default world is "world"
x: <x>
y: <y>
z: <z>
yaw: <yaw>
pitch: <pitch>
Teleport a player
discord
discord
- type: discord
webhook: "https://discord.com/api/webhooks/<url>"
message: "Test webhook"
Allow to send a discord webhook. You can add a embeds, username, tts etc.
- type: discord
webhook: <url>
message: <content>
avatar: <avatar url>
username: <webhook username>
embeds:
- title: <embed title>
description: <embed description>
url: <url>
color: <hex color>
footer:
text: <text footer>
icon-url: <icon url>
thumbnail:
url: <url>
image:
url: <url>
author:
name: <author name>
url: <author url>
icon-url: <author icon url>
fields:
- name: <field name>
value: <field value>
inline: true/false
discord component
discord component
- type: discord component
webhook: "https://discord.com/api/webhooks/<url>"
username: "GroupeZ" #Optional
avatar_url: "" #Optional
component: [
{
"type": 10,
"content": "Never trust a alien with a giant spaghetti."
},
{
"type": 14,
"divider": true,
"spacing": 2
},
{
"type": 10,
"content": "If life gives you invisible unicorn, make invisible unicorn soup."
},
{
"type": 17,
"accent_color": 14951974,
"spoiler": true,
"components": [
{
"type": 10,
"content": "Never trust a grandma with a giant spaghetti."
}
]
}
]
Send a webhook discord components. To generate your component you must go to the site https://discord.builders/, then you must copy the result json. You can simplify your json into one line here.
Last updated