Skip to content

Built-in actions

This is an exhaustive list of all actions provided by UnderscoreEnchants as of v2.2. You are expected to be familiar with the syntax of actions and how to work with them, as outlined in the enchantments guide.

air

Info

Sets entity's remaining air ticks, clamping it between 0 and 2147483647.

Aliases: set-air, remaining-air, set-remaining-air

Arguments:

  1. The air in ticks (1 tick = 0.05 seconds)

Example: - air 500

This action is marked as stable as of 2.2.

apply-velocity

Info

Applies velocity to an entity.

Aliases: velocity

Arguments:

  1. The X value of the velocity to apply
  2. The Y value of the velocity to apply
  3. The Z value of the velocity to apply

Example:

  • apply-velocity 0 0.75 0

This action is marked as stable as of 2.2.

attribute

Info

Sets the value of an attribute for the target entity.

Aliases: set-attribute, attr, set-attr, attribute-value, attr-value, set-attribute-value, set-attr-value

Arguments:

  1. The attribute name
  2. The new value (use default to reset the value to default)

Example:

  • attr generic_movement_speed 6

This action is marked as stable as of 2.2.

bed

Info

Teleports the player to their bed location.

Aliases: tp-bed, teleport-bed, bed-tp, bed-teleport, tp-to-bed, teleport-to-bed

This action is marked as stable as of 2.2.

break

Info

Breaks a block naturally with the item that the player is holding.

Aliases: break-block

Arguments:

  1. The X coordinate of the block
  2. The Y coordinate of the block
  3. The Z coordinate of the block
  4. (optional) The world name, defaults to the player's world if not specified

Example:

  • break 0 65 0 world

This action is marked as stable as of 2.2.

broadcast

Info

Broadcasts a message server-wide.

Aliases: broadcast-message, servermessage, server-message, allmessage, all-message

Arguments:

  1. The message to broadcast

Example:

  • broadcast The server enchantment system is powered by UnderscoreEnchants!

This action is marked as stable as of 2.2.

cancel

Info

Cancels the event. This will fail silently if the event is not cancellable.

Aliases: undo

This action is marked as stable as of 2.2.

console-command

Info

Executes a command on behalf of the console.

Aliases: console, elevated-command, admin-command

Arguments:

  1. The command to execute

Example:

  • console-command kickall

This action is marked as stable as of 2.2.

create-world

Info

Creates and loads a new world, or loads an existing one.

Aliases: load-world

Arguments:

  1. The world type to use
  2. The settings for the generator (put -1 to use the defalt settings)
  3. The name of the world with no spaces

Example:

  • create-world AMPLIFIED -1 new_world

This action is marked as stable as of 2.2.

damage

Info

Damages an entity on behalf of some player. Does not deal true damage (accounts for armor, effects, etc).

Aliases: dmg, attack

Arguments:

  1. The amount of damage to deal
  2. The name of an online player

Example:

  • dmg <placeholder=rndint:arguments={lowerBound=1|upperBound=3}> <name>

This action is marked as stable as of 2.2.

damage-item

Info

Damages the player's item by a certain amount.

Arguments:

  1. The slot in which the item resides
  2. The amount (if a negative amount is specified, the item will be repaired by that amount instead)

Example:

  • damage-item chestplate 2

This action is marked as stable as of 2.2.

direction

Info

Changes the entity's yaw and pitch.

Aliases: change-direction, dir, change-dir

Arguments:

  1. Yaw
  2. Pitch

Example:

  • dir 58.4 -90

This action is marked as stable as of 2.2.

drop-hand

Info

Drops the player's main hand/off hand item at their location.

Aliases: drop-hand-item

Arguments:

  1. The hand (start with m for main hand, anything else for off hand)
  2. Whether to drop the entire stack or just one item from the stack (start with f for full stack, anything else for one item)

Example:

  • drop-hand m f

This action is marked as stable as of 2.2.

drop-item

Info

Drops an item at a location.

Aliases: drop-item-world, drop-item-in-world

Arguments:

  1. The item in the standard item format
  2. The X coordinate of the location
  3. The Y coordinate of the location
  4. The Z coordinate of the location
  5. The world name

Example:

  • drop-item DIAMOND 30 120 -801 world

This action is marked as stable as of 2.2.

effect

Info

Adds an effect to an entity.

Aliases: add-effect

Arguments:

  1. The effect name
  2. The duration in ticks (1 tick = 0.05 seconds)
  3. The amplifier

Example:

  • effect DARKNESS 200 1

This action is marked as stable as of 2.2.

fake-lightning

Info

Strikes a fake lightning at the entity's position.

Aliases: strike-fake-lightning

This action is marked as stable as of 2.2.

fire

Info

Sets the entity on fire.

Aliases: set-fire, fire-ticks, set-fire-ticks

Arguments:

  1. The amount of time in ticks (1 tick = 0.05 seconds)

Example:

  • fire 500

This action is marked as stable as of 2.2.

food

Info

Sets the player's food level, clamping it between 0 and 20.

Aliases: set-food, satiety, set-satiety

Arguments:

  1. The food level

Example:

  • food 15

This action is marked as stable as of 2.2.

forward

Info

Throws the entity forward a certain amount of blocks, or until the path is obstructed. Note that the amount of blocks is an approximation and the result might be a bit further or closer than expected.

Aliases: go-forward, teleport-forward, dash

Arguments:

  1. The amount of blocks (any positive number)

Example:

  • forward 4.5

This action is marked as stable as of 2.2.

gamemode

Info

Sets the player's gamemode

Aliases: gm, set-gamemode, set-gm, change-gamemode, change-gm

Arguments:

  1. The gamemode, either as a string (survival/creative/etc), or as a number (0 for survival, 1 for creative, etc)

Example:

  • gm 0

This action is marked as stable as of 2.2.

give

Info

Gives an item to the player. If there is no free space in their inventory, it will be dropped at their location.

Aliases: give-item, item-give

Arguments:

  1. The item

Example:

  • give DIAMOND

This action is marked as stable as of 2.2.

hand

Info

Sets the player's main hand/off hand item.

Aliases: set-hand

Arguments:

  1. The hand (start with m for main hand, anything else for off hand)
  2. The item

Example:

  • hand m DIAMOND

heal

Info

Heals the entity to their maximum HP.

Aliases: restore

This action is marked as stable as of 2.2.

hp

Info

Sets entity's health.

Aliases: set-hp, health, set-health

Arguments:

  1. The amount of HP, clamping it between 0 and the entity's max health

Example:

  • hp 306

This action is marked as stable as of 2.2.

launch-arrow

Info

Sends an arrow in the direction that the entity is looking.

Aliases: arrow, send-arrow

This action is marked as stable as of 2.2.

launch-fireball

Info

Sends a fireball in the direction that the entity is looking.

Aliases: fireball, send-fireball

This action is marked as stable as of 2.2.

level

Info

Sets the player's current level, clamping it between 0 and 2147483647.

Aliases: set-level, current-level, set-current-level, lvl, set-lvl, current-lvl, set-current-lvl

Arguments:

  1. The level

Example:

  • level 15

This action is marked as stable as of 2.2.

lightning

Info

Strikes a lightning at the entity's current position.

Aliases: strike-lightning

This action is marked as stable as of 2.2.

location-sound

Info

Plays a sound at a location.

Aliases: place-sound, world-sound

Arguments:

  1. The sound name
  2. The X coordinate of the location
  3. The Y coordinate of the location
  4. The Z coordinate of the location
  5. The world name

Example:

  • place-sound ENTITY_ENDERMAN_SCREAM 50 120 -801 world

This action is marked as stable as of 2.2.

max-hp

Info

Sets entity's max health.

Aliases: set-max-hp, max-health, set-max-health

Arguments:

  1. The amount of max HP

Example:

  • max-hp 306

This action is marked as stable as of 2.2.

money

Info

Sets player's balance, either using Treasury's or Vault's economy (whichever is present, with Treasury taking the priority if both are). If none of them are present, silently fails.

Aliases: set-money

Arguments:

  1. The balance

Example:

  • money 31038

This action is marked as stable as of 2.2.

particle

Info

Spawns a particle at the entity's location.

Aliases: spawn-particle

Arguments:

  1. The particle name

Example:

  • particle SUSPENDED_DEPTH

This action is marked as stable as of 2.2.

particle-head

Info

Spawns a particle at the entity's head location.

Aliases: particle-eyes, spawn-particle-eyes, spawn-particle-head

Arguments:

  1. The particle name

Example:

  • particle-head SUSPENDED_DEPTH

This action is marked as stable as of 2.2.

pdc

Info

Adds a key-value pair to the entity's PDC (persistent data container). Every value is treated as a string.

Aliases: set-pdc

Arguments:

  1. The key
  2. The value

Example:

  • pdc MyServerRank VIP

This action is marked as stable as of 2.2.

player-actionbar

Info

Sends a message to the player via actionbar.

Aliases: actionbar, send-actionbar

Arguments:

  1. The message to send

Example:

  • actionbar You are DOOMED!

This action is marked as stable as of 2.2.

player-bossbar

Info

Spawns a bossbar and displays it to the player.

Aliase: bossbar, send-bossbar

Arguments:

  1. The bar color
  2. The bar style
  3. The duration in ticks that the bossbar should last (1 tick = 0.05 seconds)
  4. The message to display at the bossbar

Example:

  • bossbar yellow solid 160 You are DOOMED!

This action is marked as stable as of 2.2.

player-chat

Info

Sends a message/commands on the player's behalf.

Aliases: chat, say

Arguments:

  1. The message to send

Example:

  • chat You are DOOMED!

This action is marked as stable as of 2.2.

player-message

Info

Sends a message to the player via chat.

Aliases: message, send-message, msg

Arguments:

  1. The message to send

Example:

  • msg You are DOOMED!

This action is marked as stable as of 2.2.

player-subtitle

Info

Sends a message to the player via subtitle.

Aliases: subtitle, send-subtitle

Arguments:

  1. The amount of ticks for the subtitle to fade in (1 tick = 0.05 seconds)
  2. The amount of ticks for the subtitle to stay
  3. The amount of ticks for the subtitle to fade out
  4. The message to send

Example:

  • subtitle 40 100 40 You are DOOMED!

This action is marked as stable as of 2.2.

player-time

Info

Sets the player's personal time.

Aliases: player-set-time

Arguments:

  1. The time
  2. Whether the time should be relative (true) to the server time, or fixed (false)

Example:

  • player-time 15000 true

This action is marked as stable as of 2.2.

player-title

Info

Sends a message to the player via title.

Aliases: title, send-title

Arguments:

  1. The amount of ticks for the title to fade in (1 tick = 0.05 seconds)
  2. The amount of ticks for the title to stay
  3. The amount of ticks for the title to fade out
  4. The message to send

Example:

  • title 40 100 40 You are DOOMED!

This action is marked as stable as of 2.2.

player-weather

Info

Sets the player's personal weather.

Aliases: player-set-weather

Arguments:

  1. The weather (either rain or clear)

Example:

  • player-weather rain

This action is marked as stable as of 2.2.

remove-buffs

Info

Removes all positive effects from an entity.

Aliases: take-buffs

This action is marked as stable as of 2.2.

remove-debuffs

Info

Removes all negative effects from an entity.

Aliases: take-debuffs

This action is marked as stable as of 2.2.

remove-effect

Info

Removes an effect from an entity.

Aliases: take-effect

Arguments:

  1. The effect name

Example:

  • remove-effect DARKNESS

This action is marked as stable as of 2.2.

reset-max-hp

Info

Resets the entity's max health.

Aliases: reset-max-health

This action is marked as stable as of 2.2.

reset-player-time

Info

Resets player's perosonal time and synchronizes it back with the world time.

This action is marked as stable as of 2.2.

reset-player-weather

Info

Resets player's perosonal weather and synchronizes it back with the world weather.

This action is marked as stable as of 2.2.

satiate

Info

Satiates the player.

This action is marked as stable as of 2.2.

set-block

Info

Sets a block at a location.

Aliases: place-block

Arguments:

  1. The block type
  2. The X coordinate of the location
  3. The Y coordinate of the location
  4. The Z coordinate of the location
  5. The world name

Example:

  • set-block DIAMOND_BLOCK 50 120 -801 world

This action is marked as stable as of 2.2.

shuffle-hotbar

Info

Shuffles the player's hotbar.

Aliases: shuffle-bar, hotbar-shuffle

This action is marked as stable as of 2.2.

shuffle-inventory

Info

Shuffles the player's inventory.

Aliases: inv-shuffle, inventory-shuffle, shuffle-inv

This action is marked as stable as of 2.2.

skull

Info

Gives the player a skull of the specified player. If there's no free space in the player's inventory, it will be dropped at their location. The behavior of this action is unknown if your server is running with online-mode=false.

Aliases: give-skull

Arguments:

  1. The name of the player, or a selector (e.g. @p) if the selector only returns one player

Example:

  • skull Notch

This action is marked as stable as of 2.2.

sound

Info

Plays a sound to an entity.

Aliases: play-sound

Arguments:

  1. The sound name

Example:

  • sound ENTITY_ENDERMAN_SCREAM

This action is marked as stable as of 2.2.

spawn-entity

Info

Spawns an entity at a location.

Aliases: create-entity, build-entity

Arguments:

  1. The entity type
  2. The X coordinate of the location
  3. The Y coordinate of the location
  4. The Z coordinate of the location
  5. The world name

This action takes extra optional parameters.

  • To set the entity's initial health, use HEALTH=<health>
  • To give the entity some effects, use this syntax: EFFECTS=<effect_name>;<duration>;<amplifier>|<effect_name>;... (find effect names here)
  • To set the entity's name, use NAME=<name> with no spaces (use underscores (_) if you need spaces, they will be replaced with spaces)

Example:

  • spawn-entity ENDERMAN 50 120 -801 world HEALTH=47.5 EFFECTS=INCREASE-DAMAGE;-1;2|DAMAGE-RESISTANCE;-1;5 NAME=My_Pal

This action is marked as stable as of 2.2.

statistic

Info

Sets the player's statistic.

Aliases: set-statistic, stat, set-stat, statistic-value, stat-value, set-statistic-value, set-stat-value

Arguments:

  1. The statistic name
  2. The value

Example:

  • stat deaths 6

This action is marked as stable as of 2.2.

time

Info

Sets time at a world.

Aliases: change-time, set-time

Arguments:

  1. The time
  2. The world name

Example:

  • time 12000 world

This action is marked as stable as of 2.2.

tp

Info

Teleports the entity to a certain location.

Aliases: teleport

Arguments:

  1. The X coordinate of the location
  2. The Y coordinate of the location
  3. The Z coordinate of the location
  4. The world name

If you do not specify the world name, it'll be assumed that the teleportation should take place in the same world that the entity is in.

If you do not specify any coordinates and only the world name, the entity will be teleported to the spawnpoint of that world.

Example:

  • tp 581 110 -303

This action is marked as stable as of 2.2.

weather

Info

Sets weather at a world.

Aliases: set-weather, change-weather

Arguments:

  1. The weather (start with s for sun, r for rain and t for thunder)
  2. The world name

Example:

  • weather s world

This action is marked as stable as of 2.2.

xp

Info

Sets the player's current experience, clamping it between 0 and 2147483647

Aliases: exp, set-exp, current-exp, set-current-exp, set-xp, current-xp, set-current-xp

Arguments:

  1. The amount of experience

Example:

  • xp 15

This action is marked as stable as of 2.2.