Cross-platform Actions
These actions are cross-compatible with Spigot, Velocity, and BungeeCord.
Delay
Execute action after a delay
action:
+: TJAction
delay_1:
message: "wtf" # This message will be sent after 10 seconds
delay: "10s"
Group
Group multiple actions together. Recommended to use with other actions.
action:
+: TJAction
random_1:
message_1: "&cYou didn’t win :("
group_1:
message_1: "&aCongratulations! You got &bDiamonds &fx10&a!"
console_1: "give %player_name% diamond 10"
Loop
Repeating fun?
action:
+: TJAction
loop_1:
time: "3" # This parameter accepts expressions, so '' is required.
message: "&eI will run three times."
Random
Pick N from multiple?
action:
+: TJAction
random_1:
amount: 1 # (Number of selected results, optional)
message_1: "&aI am number one."
message_2: "&eI am number two."
message_3: "&cI am number three."
Set
Set a variable to the result of an expression (see If section).
Variables only exist in memory and will be lost after reboot.
action:
+: TJAction
set_1:
id: "hello"
expr: "%player_y% > 63"
keep: false # Set only if not already exists (optional)
if_1:
expr: "{hello}" # Use "{var_name}" to access custom variable
y:
message: "&bYou are above sea level!"
n:
message: "&cYou are below sea level!"
Broadcast
Delegate the action to all players
action:
+: TJAction
broadcast:
message: "Now, everyone knows I’m noisy ><"
AsConsole
Delegate the action to the console
action:
+: TJAction
asconsole:
message: "Did the console see me??"
Conditional Actions
HasPerm
Checks if the player has permission
action:
+: TJAction
if_1:
condition:
hasperm_1: "hello.world"
n:
message: "&cYou don’t have hello.world permission"
y:
message: "Hello World!"
And
Logical AND
action:
+: TJAction
if_1:
condition:
and_1:
hasperm_1: "hello.world"
hasperm_2: "goodbye.world"
y:
message: "Hello World!"
message_1: "Goodbye World!"
n:
message: "&cYou don’t have hello.world + goodbye.world permissions"
Or
Logical OR
action:
+: TJAction
if_1:
condition:
or_1:
hasperm_1: "hello.world"
hasperm_2: "hello_world"
y:
message: "Hello World!"
n:
message: "&cYou don’t have hello.world or hello_world permission"
Check
Multiple conditions check
action:
+: TJAction
check:
conditions:
- condition: 3 > 1
success: "Yay, 3 > 1"
fail: "&cThis shouldn’t happen@@?"
- condition:
not: "%player_health% > 10"
fail: "Your HP is too high..."
success: # All checks passed
message: "&aOk"
console: "give %this% golden_apple"
fail: # Any check fails (optional)
message: "&cFail"
If
If?
action:
+: TJAction
if_1:
condition:
hasperm_1: "hello.world"
n:
message: "&cYou don’t have hello.world permission"
y:
message: "Hello World!"
action:
+: TJAction
if_1:
expr: "%player_y% > 63 and %player_level% >= 10" # Simple expression
y:
message: "&bYou are above sea level and level 10!"
n:
message: "&cYou're below sea level or not level 10 yet!"
Last updated