πͺ Action
The action system offers pre-set effects provided by the plugin. However, you can also add your own actions by using the API. This system can be applied anywhere an action can be triggered, like when you successfully catch a fish, when a competition ends and rewards are given out, or when selling fish.
Action is composed of three parts
type: The action type
value: The arguments of the action
chance: Optional (0~1 Default: 1)
If the value is an integer or a double value, you can use expression for instance
exp_action:
type: exp
value: '{level} * 3'
Action Library
message (Send a message to player)
messages_action:
type: message
value:
- '<#FF4500>[1st] Congratulations! You got the first prize!'
random-message (Send a random message from the list)
message:
type: random-message
value:
- 'Message 1'
- 'Message 2'
- 'Message 3'
broadcast (Send a message to online players)
broadcast_action:
type: broadcast
value:
- '<#D4F2E7>β€ββββββββββββββββββββββββββ₯'
- ''
- ' <gray>[<#87CEFA>π£<gray>] <gradient:#F0F8FF:#87CEFA:#F0F8FF>Fishing Competition'
- ''
- ' <#E1FFFF>Objectives:'
- ' <#B0C4DE>Catch as many fish as possible'
- ' <#B0C4DE>Start fishing to participate!'
- ''
- '<#D4F2E7>β£ββββββββββββββββββββββββββ’'
command (Execute a console command)
command_action:
type: command
value:
- 'money give {player} 200'
player-command (Execute a command as player)
command_action:
type: player-command
value:
- 'say hello'
random-command (Execute a random console command from list)
command_action:
type: random-command
value:
- 'money give {player} 200'
- 'money give {player} 100'
- 'money give {player} 50'
close-inv (Close the inventory player is currently opening)
close_action:
type: close-inv
actionbar
actionbar_action:
type: actionbar
value: 'Hi'
random-actionbar
actionbar_action:
type: random-actionbar
value:
- 'Hi'
- 'Hello'
- 'Hola'
mending (Give player exp that would be applied to mending)
mending_action:
type: mending
value: 1
exp (Give player exp that would directly go into levels)
exp_action:
type: exp
value: 1
chain (Execute actions as a group)
chain_action:
type: chain
value:
action_1: ...
action_2: ...
chance: 0.5
delay (Delay x ticks)
delay_action:
type: delay
value:
delay: 20
async: false
actions:
action_1: ...
action_2: ...
timer
timer_action:
type: timer
value:
delay: 3
async: false
duration: 20
period: 2
actions:
action_1: ...
action_2: ...
title
title_action:
type: title
value:
title: '<green>GG!</green>'
subtitle: 'You caught a {nick}'
fade-in: 20
stay: 30
fade-out: 10
random-title
title_action:
type: random-title
value:
titles:
- '<green>GG!</green>'
- '<green>Good Job!</green>'
subtitles:
- 'You caught a {loot}'
- 'Whoa! Nice catch!'
- 'Oh {loot} here we go!'
- 'Let''s see what it is!'
fade-in: 20
stay: 30
fade-out: 10
sound
sound_action:
type: sound
value:
key: 'minecraft:block.amethyst_block.place'
source: 'player'
volume: 1
pitch: 1
potion-effect
potion_action:
type: potion-effect
value:
type: 'blindness'
duration: 20
amplifier: 0
plugin-exp (Experience from other plugins for instance a job/skill plugin)
plugin_exp_action:
type: plugin-exp
value:
plugin: mcMMO
exp: 20
target: FISHING
conditional (Actions can only be triggered when player satisfy the conditions)
conditional_action:
type: conditional
value:
conditions:
...
actions:
...
priority (Execute the first action group that meets the conditions.)
priority_action:
type: priority
value:
priority_1:
conditions:
...
actions:
...
priority_2:
conditions:
...
actions:
...
others:
actions:
...
fake-item (Display a fake item for some time) Note: "opposite-yaw" and "yaw" cannot be used at the same time
fake_item_action:
type: fake-item
value:
duration: 25 <- ticks
position: other <- other/player
item: water_effect
use-item-display: true # whether to use item display (1.19.4+)
y: 0 <- y offset
x: 0 <- x offset
z: 0 <- z offset
yaw: 0
opposite-yaw: true
range: 0 # If range = 0, the hologram can only be seen by one player
hologram (Display a hologram for some time)
hologram_action:
type: hologram
value:
duration: 20 <- ticks
text: '{player} caught a {loot}!'
position: player <- other/player
use-text-display: true # whether to use text display (1.19.4+)
rgba: 0,0,0,0
range: 16 # If range = 0, the hologram can only be seen by one player
y: 2 <- y offset
x: 0 <- x offset
z: 0 <- z offset
fish-finder
finder_action:
type: fish-finder
value: false (false: water / true: lava)
message-nearby
message_action:
type: message-nearby
value:
message:
- 'Hello {near}. This message is sent by {player}'
range: 32
command-nearby
command_action:
type: command-nearby
value:
command:
- 'give {near} apple'
range: 32
actionbar-nearby
actionbar_action:
type: actionbar-nearby
value:
actionbar: 'This is an actionbar'
range: 32
title-nearby
title_action:
type: title-nearby
value:
title: '<green>Title</green>'
subtitle: 'subtitle'
fade-in: 20
stay: 30
fade-out: 10
range: 32
food
https://minecraft.wiki/w/Hunger
food_action:
type: food
value: 2
saturation
https://minecraft.wiki/w/Hunger
saturation_action:
type: saturation
value: 1.5
item-amount
item_amount_action:
type: item-amount
value:
# main / off
hand: main
amount: -1
durability
durability_action:
type: durability
value:
# hand / offhand / feet / head / chest /legs
slot: hand
amount: -1
give-item
item_action:
type: give-item
value:
item: CustomFishing:star_rod
amount: 1
to-inventory: false # whether to drop the item or go directly into inventory
give-money
money_action:
type: give-money
value: 100.12
take-money
money_action:
type: take-money
value: 50.54
level
money_action:
type: level
value: -10
context-arg
argument_action:
type: context-arg
value:
test: custom
another: another
drop-random-items (Drop random items based on current conditions)
drop_random_loots_action:
type: drop-random-loots
value:
amount: 10
extra-attempts: 5 # how many times should the plugin try if the loot is not an item
to-inventory: false