Actions

A list of all actions with examples.

Generator Actions

Keep Stage

Stay on the current stage when a generator block is mined. (Same behavior as if idle was true)

on-break:
  do: keepStage   # Only works with on-break

Previous Stage

Set the generator to the previous stage.

  do: previousStage

Next Stage

Set the generator to the next stage.

do: nextStage

Set Stage

Set the generator to a specific stage.

do: setStage 1

Damage Generator

Decrease the health of the current generator stage.

Server Actions

Broadcast

Sends a chat message to all players on the server. Supports placeholders and color codes.

Lightning

Strikes lightning at a specific coordinate in a given world.

Optional: world, doDamage

Console Command

Runs a command from the server console.

Drop Item

Drops a specific item at a given coordinate.

Optional: world

Drop Exp

Drops specific exp at the given coordinate. Supports amount (fixed, ranged, multi).

Optional: world, orbs

Spawn Particle

Spawns a particle effect at a specific coordinate.

Optional: world

Play Sound

Plays a sound at a specific coordinate.

Optional: world


Function Actions

Stop

Ends function execution completely when called from anywhere.

Even when used inside a global function:

Return

Ends current function execution. It will only have effect on the function it is used in.

When used inside a global function:

Goto

Go to a specific function in a multi function. This should be rarely need to be used, I leave for very few cases when necessary.

DANGEROUS: if used improperly it will cause a StackOverflowError and crash your server.

Event Actions

Cancel Event

Stops the event that triggered the function from continuing.

Supported by: on-break

Set Cancelled

Manually sets whether the event is cancelled (true or false).

Supported by: on-break


Block Actions

Strike Block

Creates a lightning effect on the block that was interacted with.

Drop Item at Block

Drops an item from the block towards the player or on top of the block.

Spawn Particle at Block

Spawns a particle effect at the block. Particle effects are located inside effects/particles.

Play Sound at Block

Plays a sound effect at the block. Sound effects are located inside effects/sounds.


Player Actions

Drop Item at Player

Drops an item at the player's location.

Optional: amount, doFortune

Spawn Particle at Player

Spawns a particle effect at the player. Particle effects are located inside effects/particles.

Play Sound at Player

Plays a sound for the player. Sound effects are located inside effects/sounds.

Give Exp

Gives a specific amount of experience points to the player.

Give Flag

Assigns a flag to the player. (Flags are not saved when the player quits the server)

Give Item

Gives a material or item to the player. (If it cannot fit in the inventory it will drop on the ground)

Give Money

Gives a specific amount of money to the player. (Requires Vault and economy plugin installed)

Take Exp

Removes a specific amount of experience points from the player.

Take Flag

Removes a flag from the player.

Take Item

Removes a specific item from the player's inventory.

Take Money

Removes a specific amount of money from the player.

Set Exp

Sets the player's experience points to a specific value.

Heal

Restores a specific amount of health to the player.

Damage

Deals a specific amount of damage to the player.

Command

Runs a command as the player.

Chat Message

Sends a chat message to the player.

Message

Sends a custom message to the player. Messages are found inside messages folder.

Send Chat

Sends a chat message to the player. (This is the same as chatMessage)

Send Title

Sends a title message to the player.

Send Actionbar

Sends an actionbar message to the player.

Send Hologram

Sends a hologram message to the player.

Optional: offsetX, offsetY, offsetZ, rangeX, rangeY, rangeZ

Strike Player

Creates a lightning effect on the player.

Optional: doDamage

Set Flight

Enables or disables flight for the player.

Teleport

Teleports the player to a specific coordinate and rotation.

Open Ender Chest

Opens the player's ender chest.

Damage Tool

Damage the player's main hand tool. Compatible with unbreaking enchant.

Last updated