Denizen Script Meta Documentation Search


Learn about how Denizen works in The Beginner's Guide.
Showing 27 search results for cursor out of 3939 meta-documentation entries...

Partial Name Match Results



Mechanism


Nameitem_on_cursor
ObjectPlayerTag
InputItemTag
Related Tags<PlayerTag.item_on_cursor> Returns the item on the player's cursor, if any. This includes (...)
DescriptionSets the item on the player's cursor.
This includes chest interfaces, inventories, and hotbars, etc.
Generated Example
- adjust <player> item_on_cursor:stick
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L2942

Tag


Name<EntityTag.cursor_on_solid[(<range>)]>
ReturnsLocationTag
DescriptionReturns the location of the solid block the entity is looking at.
Optionally, specify a maximum range to find the location from (defaults to 200).
Note that this will return null if there is no solid block in range.
This only uses solid blocks, ie it ignores passable blocks like tall-grass. Use Tag:EntityTag.cursor_on to include passable blocks.
Equivalent to <EntityTag.eye_location.ray_trace[return=block]>
Generated Example
- teleport <player> <player.cursor_on_solid>
Grouplocation
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L1585
Name<EntityTag.cursor_on[(<range>)]>
ReturnsLocationTag
DescriptionReturns the location of the block the entity is looking at.
Optionally, specify a maximum range to find the location from (defaults to 200).
This uses logic equivalent to Tag:LocationTag.precise_cursor_on_block.
Note that this will return null if there is no block in range.
This uses all blocks, ie it includes passable blocks like tall-grass and water. Use Tag:EntityTag.cursor_on_solid to exclude passable blocks.
Equivalent to <EntityTag.eye_location.ray_trace[return=block;fluids=true;nonsolids=true]>
Generated Example
- teleport <player> <player.cursor_on>
Grouplocation
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L1608
Name<LocationTag.precise_cursor_on_block[(<range>)]>
ReturnsLocationTag
DescriptionDeprecated in favor of Tag:LocationTag.ray_trace with input setting [return=block].
Generated Example
- teleport <player> <player.location.precise_cursor_on_block>
Groupworld
Deprecateduse "ray_trace[return=block]" instead.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1909
Name<LocationTag.precise_cursor_on[(<range>)]>
ReturnsLocationTag
DescriptionDeprecated in favor of Tag:LocationTag.ray_trace with all default settings (no input other than optionally the range).
Generated Example
- teleport <player> <player.location.precise_cursor_on>
Groupworld
Deprecateduse "ray_trace" instead.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1930
Name<PlayerTag.item_on_cursor>
ReturnsItemTag
MechanismPlayerTag.item_on_cursor
DescriptionReturns the item on the player's cursor, if any. This includes
chest interfaces, inventories, and hotbars, etc.
Generated Example
- give <player.item_on_cursor>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1592
Name<server.map_cursor_types>
ReturnsListTag
DescriptionReturns a list of all map cursor types known to the server.
Generally used with Command:map and Language:Map Script Containers.
For the default ("vanilla") map cursor types, see the "Text ID" column in 🔗https://minecraft.wiki/w/Map#Map_icons.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L925

Semi-Decent Match Results



Command


NamePlayEffect
Syntaxplayeffect [effect:<name>] [at:<location>|...] (data:<#.#>) (special_data:<map>) (visibility:<#.#>) (quantity:<#>) (offset:<#.#>,<#.#>,<#.#>) (targets:<player>|...) (velocity:<vector>)
Short DescriptionPlays a visible or audible effect at the location.
Full DescriptionAllows the playing of particle effects anywhere without the need of the source it comes from originally.
The particles you may use, can come from sources such as a potion effect or a portal/Enderman with their particles respectively.
Some particles have different data which may include different behavior depending on the data. Default data is 0
Specifying a visibility value changes the sight radius of the effect. For example if visibility is 15; Targeted players won't see it unless they are 15 blocks or closer.
You can add a quantity value that allow multiple of the same effect played at the same time. If an offset is set, each particle will be played at a different location in the offset area.
Everyone will see the particle effects unless a target has been specified.
See Language:Particle Effects for a list of valid effect names.

Version change note: The original PlayEffect command raised all location inputs 1 block-height upward to avoid effects playing underground when played at eg a player's location.
This was found to cause too much confusion, so it is no longer on by default. However, it will still happen for older commands.
The distinction is in whether you include the (now expected to use) "at:" prefix on your location argument.
If you do not have this prefix, the system will assume your command is older, and will apply the 1-block height offset.

Some particles will require input to the "special_data" argument. The data input is a MapTag with different keys per particle.
- For DUST particles, the input is of format [size=<size>;color=<color>], e.g. "[size=1.2;color=red]".
- For DUST_COLOR_TRANSITION particles, the input is of format [size=<size>;from=<color>;to=<color>], e.g "[size=1.2;from=red;to=blue]".
- For BLOCK, BLOCK_CRUMBLE, BLOCK_MARKER, DUST_PILLAR, or FALLING_DUST particles, the input is of format [material=<material>], e.g. [material=stone]
- For VIBRATION particles, the input is of format [origin=<location>;destination=<location/entity>;duration=<duration>], for example: [origin=<player.location>;destination=<player.cursor_on>;duration=5s]
- For ITEM particles, the input is of format [item=<item>], e.g. "[item=stick]".
- For TRAIL particles, the input is of format [color=<color>;target=<location>;duration=<duration>], e.g. "[color=red;target=<player.cursor_on>;duration=20s]".
- For ENTITY_EFFECT particles, the input is of format [color=<color>], e.g. "[color=green]".
- For SHRIEK particles, the input is of format [duration=<duration>], e.g. "[duration=1m]".
- For SCULK_CHARGE particles, the input is of format [radians=<element>], e.g. "[radians=<element[90].to_radians>]".

Optionally specify a velocity vector for standard particles to move. Note that this ignores the 'data' input if used.
Related Tags<server.effect_types> Returns a list of all 'effect' types known to the server. (...)
<server.particle_types> Returns a list of all particle effect types known to the server. (...)
Usage Example
# Use to create a fake explosion.
- playeffect effect:EXPLOSION_HUGE at:<player.location> visibility:500 quantity:10 offset:2.0
Usage Example
# Use to play a cloud effect.
- playeffect effect:CLOUD at:<player.location.add[0,5,0]> quantity:20 data:1 offset:0.0
Usage Example
# Use to play some effects at spawn.
- playeffect effect:FIREWORKS_SPARK at:<world[world].spawn_location> visibility:100 quantity:375 data:0 offset:50.0
Usage Example
# Use to spawn a cloud of rainbow-colored ENTITY_EFFECT particles around yourself.
- foreach <util.color_names> as:color:
    - playeffect effect:ENTITY_EFFECT at:<player.eye_location> quantity:25 special_data:[color=<[color]>]
Usage Example
# Use to shoot particles in to the direction you're looking at.
- repeat 10:
    - playeffect effect:TRAIL at:<player.eye_location> quantity:1 offset:0 special_data:[color=red;target=<player.eye_location.ray_trace[default=air]>;duration=5s]
    - wait 1t
Usage Example
# Use to spawn a SCULK_CHARGE effect upside down.
- playeffect effect:SCULK_CHARGE at:<player.eye_location.add[0,1,0]> quantity:1 offset:0 special_data:[radians=<element[180].to_radians>]
Usage Example
# Use to play a SHRIEK effect with a 5-second delay.
- playeffect effect:SHRIEK at:<player.eye_location.add[0,1,0]> quantity:1 special_data:[duration=5s]
Synonyms (Search Aid)particle
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/PlayEffectCommand.java#L55
NameTake
Syntaxtake [iteminhand/cursoritem/bydisplay:<name>/bycover:<title>|<author>/slot:<slot>/flagged:<flag>/item:<matcher>] (quantity:<#>) (from:<inventory>)
Short DescriptionTakes an item from the player.
Full DescriptionTakes items from a player or inventory.

If the player or inventory does not have the item being taken, nothing happens.

Using 'slot:' will take the items from that specific slot.

Using 'flagged:' with a flag name will take items with the specified flag name, see Language:flag system.

Using 'iteminhand' will take from the player's held item slot.

Using 'cursoritem' will take from the player's held cursor item (as in, one that's actively being picked up and moved in an inventory screen).

Using 'bydisplay:' will take items with the specified display name.

Using 'bycover:' will take a written book by the specified book title + author pair.

Using 'raw_exact:' (Intentionally undocumented) will compare all raw details of an item exactly. This is almost always a bad idea to use. DO NOT USE.

Using 'item:' will take items that match an advanced item matcher, using the system behind Language:Advanced Object Matching.

Flagged, Slot, ByDisplay, and Raw_Exact, all take a list as input to take multiple different item types at once.

If no quantity is specified, exactly 1 item will be taken.

Specifying a raw item without any matching method is considered unreliable and should be avoided.

Optionally using 'from:' to specify a specific inventory to take from. If not specified, the linked player's inventory will be used.

The options 'iteminhand' and 'cursoritem' require a linked player and will ignore the 'from:' inventory.

To take xp from a player, use Command:experience.
To take money from a player, use Command:money.
Related Tags<PlayerTag.item_in_hand> Returns the item the entity is holding, or air if none.
Usage Example
# Use to take an arrow from the player's enderchest
- take item:arrow from:<player.enderchest>
Usage Example
# Use to take the current holding item from the player's hand
- take iteminhand
Usage Example
# Use to take 5 emeralds from the player's inventory
- take item:emerald quantity:5
Groupitem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/TakeCommand.java#L41

Event


Nameplayer click_type clicks item in inventory
Event Lines player (<click_type>) clicks (<item>) in <inventory>
Triggerswhen a player clicks in an inventory. Note that you likely will also want to listen to Event:player drags in inventory.
Generated Examplesafter player click_type clicks wooden_axe in inventory:
after player clicks in cartography:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switcheswith:<item> to only process the event if a specified cursor item was used.
in_area:<area> replaces the default 'in:<area>' for this event.
action:<action> to only process the event if a specified action occurred.
slot:<slot> to only process the event if a specified slot or slot_type was clicked. For slot input options, see Language:Slot Inputs.
Contexts<context.item> returns the ItemTag the player has clicked on.
<context.inventory> returns the InventoryTag (the 'top' inventory, regardless of which slot was clicked).
<context.clicked_inventory> returns the InventoryTag that was clicked in.
<context.cursor_item> returns the item the Player is clicking with.
<context.click> returns an ElementTag with the name of the click type. Click type list: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/ClickType.html
<context.slot_type> returns an ElementTag with the name of the slot type that was clicked. Slot type list: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryType.SlotType.html
<context.slot> returns an ElementTag with the number of the slot that was clicked.
<context.raw_slot> returns an ElementTag with the raw number of the slot that was clicked.
<context.is_shift_click> returns true if 'shift' was used while clicking.
<context.action> returns the inventory_action. See Language:Inventory Actions.
<context.hotbar_button> returns an ElementTag of the button pressed as a number, or 0 if no number button was pressed.
DetermineItemTag to set the current item for the event.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksInInventoryScriptEvent.java#L70

Language


Name/ex command
DescriptionThe '/ex' command is an easy way to run a single denizen script command in-game.
'Ex' is short for 'Execute'.
Its syntax, aside from '/ex' is exactly the same as any other Denizen script command.
When running a command, some context is also supplied, such as '<player>' if being run by a player (versus the console),
as well as '<npc>' if a NPC is selected by using the '/npc sel' command.

By default, ex command debug output is sent to the player that ran the ex command (if the command was ran by a player).
To avoid this, use '-q' at the start of the ex command.
Like: /ex -q narrate "wow no output"

The '/ex' command creates a new queue each time it's run,
meaning for example '/ex define' would do nothing, as the definition will be lost immediately.

If you need to sustain a queue between multiple executions, use '/exs' ("Execute Sustained").
A sustained queue will use the same queue on every execution until the queue stops (normally due to '/exs stop').
Be warned that waits will block the sustained queue - eg '/exs wait 10m' will make '/exs' effectively unusable for 10 minutes.

Examples:
/ex flag <player> test_flag:!
/ex run npc_walk_script

Need to '/ex' a command as a different player or NPC? Use Language:The Player and NPC Arguments.

Examples:
/ex narrate player:<[aplayer]> 'Your health is <player.health.formatted>.'
/ex walk npc:<[some_npc]> <player.cursor_on>
GroupConsole Commands
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/command/ExCommandHandler.java#L34
NameInventory Actions
DescriptionUsed by some inventory world events to describe the action of the inventory event.

Actions, as described by the bukkit javadocs:
CLONE_STACK
A max-size stack of the clicked item is put on the cursor.
COLLECT_TO_CURSOR
The inventory is searched for the same material, and they are put on the cursor up to
MaterialTag.max_stack_size.
DROP_ALL_CURSOR
The entire cursor item is dropped.
DROP_ALL_SLOT
The entire clicked slot is dropped.
DROP_ONE_CURSOR
One item is dropped from the cursor.
DROP_ONE_SLOT
One item is dropped from the clicked slot.
HOTBAR_MOVE_AND_READD
The clicked item is moved to the hotbar, and the item currently there is re-added to the
player's inventory.
HOTBAR_SWAP
The clicked slot and the picked hotbar slot are swapped.
MOVE_TO_OTHER_INVENTORY
The item is moved to the opposite inventory if a space is found.
NOTHING
Nothing will happen from the click.
PICKUP_ALL
All of the items on the clicked slot are moved to the cursor.
PICKUP_HALF
Half of the items on the clicked slot are moved to the cursor.
PICKUP_ONE
One of the items on the clicked slot are moved to the cursor.
PICKUP_SOME
Some of the items on the clicked slot are moved to the cursor.
PLACE_ALL
All of the items on the cursor are moved to the clicked slot.
PLACE_ONE
A single item from the cursor is moved to the clicked slot.
PLACE_SOME
Some of the items from the cursor are moved to the clicked slot (usually up to the max stack size).
SWAP_WITH_CURSOR
The clicked item and the cursor are exchanged.
UNKNOWN
An unrecognized ClickType.
GroupUseful Lists
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksInInventoryScriptEvent.java#L20
NameMap Script Containers
DescriptionMap scripts allow you define custom in-game map items, for usage with the map command.

The following is the format for the container.


# The name of the map script is used by the map command.
Map_Script_Name:

    type: map

    # Whether to display the original map below the custom values. Defaults to true.
    # | Some map scripts should have this key!
    original: true/false

    # Whether to constantly update things. Defaults to true.
    # | Some map scripts should have this key!
    auto update: true

    # Whether this map script renders uniquely per-player. Defaults to true.
    # | Some map scripts should have this key!
    contextual: true

    # Lists all contained objects.
    # | Most map scripts should have this key!
    objects:

        # The first object...
        1:
            # Specify the object type
            # Type can be IMAGE, TEXT, CURSOR, or DOT.
            type: image
            # Specify an HTTP url or file path within Denizen/images/ for the image. Supports animated .gif!
            image: my_image.png
            # Optionally add width/height numbers.
            width: 128
            height: 128
            # Specify a tag to show or hide custom content! Valid for all objects.
            # Note that all inputs other than 'type' for all objects support tags that will be dynamically reparsed per-player each time the map updates.
            visible: <player.name.contains_text[bob].not>

        2:
            type: text
            # Specify any text to display. Color codes not permitted (unless you know how to format CraftMapCanvas byte-ID color codes).
            text: Hello <player.name>
            # Specify the color of the text as any valid ColorTag.
            color: red
            # | Optionally, specify the following additional options:
            # Specify a font to use, which allows using special characters/other languages the default font may not support.
            font: arial
            # Specify a text size (only available with a custom font).
            size: 18
            # Specify a style, as a list that contains either "bold", "italic", or both (only available with a custom font).
            style: bold|italic
        3:
            type: cursor
            # Specify a cursor type
            cursor: red_marker
            # Optionally, specify a cursor direction. '180' seems to display as up-right usually.
            direction: 180
            # Supported on all objects: x/y positions, and whether to use worldly or map coordinates.
            x: 5
            # If 'world_coordinates' is set to 'true', the 'y' value corresponds to the 'z' value of a location.
            y: 5
            # If true: uses world coordinates. If false: uses map local coordinates. (Defaults to false).
            world_coordinates: false
            # If true: when the object goes past the edge, will stay in view at the corner. If false: disappears past the edge (defaults to false).
            show_past_edge: false

        4:
            type: dot
            # Specify the radius of the dot.
            radius: 1
            # Specify the color of the dot as any valid ColorTag.
            color: red



A list of cursor types is available through Tag:server.map_cursor_types.
GroupScript Container System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/MapScriptContainer.java#L23

Tag


Name<ItemTag.map_to_image[<player>]>
ReturnsImageTag
DescriptionReturns an image of a filled map item's contents.
Must specify a player for the map to render for, as if that player is holding the map.
Note that this does not include cursors, as their rendering is entirely client-side.
Generated Example
- draw id:artwork image:<player.item_in_hand.map_to_image[<player>]> x:5 y:5
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L752
Name<LocationTag.ray_trace[(range=<#.#>/{200});(return=<{precise}/block/normal>);(default=<{null}/air>);(fluids=<true/{false}>);(nonsolids=<true/{false}>);(entities=<matcher>);(ignore=<entity>|...);(raysize=<#.#>/{0})]>
ReturnsLocationTag
DescriptionTraces a line from this location towards the direction it's facing, returning the location of the first hit block or (optionally) entity.
This tag has also been referred to as 'cursor_on' or 'precise_cursor_on' in the past.
For ray tracing entities, see Tag:LocationTag.ray_trace_target.
Using 'return=normal' instead replaces the old 'precise_impact_normal' tag.
Optionally specify:
range: (defaults to 200) a maximum distance (in blocks) to trace before giving up.
return: (defaults to precise)
specify "precise" to return the exact location of the hit (if it hits a block, returns a location along the edge of the block -- but if it hits an entity, returns a location along the body of the entity)
"normal" to return the normal vector of the impact location,
or "block" to return the location of the block hit (if it hits an entity, returns equivalent to 'precise')
For "precise" and "block", the location's direction is set to the direction of the block face hit (or entity bounding box face), pointing exactly away from whatever was hit (the 'normal' direction).
default: (defaults to "null")
specify "null" to return null when nothing is hit,
or "air" to return the location of the air at the end of the trace (NOTE: can potentially be in water or other ignored block type, not just literal air).
fluids: (defaults to false) specify "true" to count fluids like water as solid, or "false" to ignore them.
nonsolids: (defaults to false) specify "true" to count passable blocks (like tallgrass) as solid, or false to ignore them.
entities: (defaults to none) specify an entity matcher for entities to count as blocking the trace, "*" for any entity counts, or leave off (or empty) to ignore entities.
ignore: (defaults to none) optional list of EntityTags to ignore even if they match the matcher.
raysize: (defaults to 0) sets the radius of the ray being used to trace entities (and NOT for blocks!).
Example
# Destroys whatever solid block the player is looking at.
- define target <player.eye_location.ray_trace[return=block]||null>
- if <[target]> != null:
    - modifyblock <[target]> air
Example
# Spawns a heart wherever the player is looking, no more than 5 blocks away.
- playeffect effect:heart offset:0 at:<player.eye_location.ray_trace[range=5;entities=*;ignore=<player>;fluids=true;nonsolids=true;default=air]>
Example
# Spawns a line of fire starting at the player's target location and spewing out in the direction of the blockface or entity hit, demonstrating the concept of a normal vector.
- define hit <player.eye_location.ray_trace[entities=*;ignore=<player>;fluids=true;nonsolids=true]||null>
- if <[hit]> != null:
    - playeffect effect:flame offset:0 at:<[hit].points_between[<[hit].forward[2]>].distance[0.2]>
Synonyms (Search Aid)locationtag.raycast, locationtag.raytrace, locationtag.ray_cast
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1728

Just Barely Matched Results



Command


NameAdjustBlock
Related Guide Pagehttps://guide.denizenscript.com/guides/basics/mechanisms.html
Syntaxadjustblock [<location>|...] [<mechanism>](:<value>) (no_physics)
Short DescriptionAdjusts a mechanism on the material of a block at the location.
Full DescriptionAdjusts a mechanism on the material of a block at the location.
That is, an equivalent to Command:adjust, but that directly applies a "MaterialTag" mechanism onto a block.

Input a location or list of locations, and the mechanism to apply.

Use the "no_physics" argument to indicate that the change should not apply a physics update.
If not specified, physics will apply to the block and nearby blocks.
Related Tags<LocationTag.material> Returns the material of the block at the location.
Usage Example
# Use to put snow on the block at the player's feet.
- adjustblock <player.location.below> snowy:true
Usage Example
# Use to switch on the lever that the player is looking at, without actually providing redstone power.
- adjustblock <player.cursor_on> switched:true no_physics
Groupcore
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/AdjustBlockCommand.java#L30
NameCopyBlock
Syntaxcopyblock [<location>] [to:<location>] (remove_original)
Short DescriptionCopies a block to another location, keeping metadata when possible.
Full DescriptionCopies a block to another location.
You may also use the 'remove_original' argument to delete the original block.
This effectively moves the block to the target location.
Related Tags<LocationTag.material> Returns the material of the block at the location.
Usage Example
# Use to copy the block the player is looking at to their current location
- copyblock <player.cursor_on> to:<player.location>
Usage Example
# Use to move the block the player is looking at to their current location (removing it from its original location)
- copyblock <player.cursor_on> to:<player.location> remove_original
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/CopyBlockCommand.java#L29
NameDebugBlock
Syntaxdebugblock [<location>|.../clear] (color:<color>) (name:<name>) (players:<player>|...) (d:<duration>{10s})
Short DescriptionShows or clears minecraft debug blocks.
Full DescriptionShows or clears minecraft debug blocks, AKA "Game Test Markers".
These are block-grid-aligned markers that are a perfect cube of a single (specifiable) transparent color, and stay for a specified duration of time or until cleared.
Markers can optionally also have simple text names.

If arguments are unspecified, the default color is white, the default player is the linked player, the default name is none, and the default duration is 10 seconds.

Note that on MC 1.21+ this has limitations (within Minecraft itself), namely:
- the color is always green.
- the duration is always 10 seconds.
- the name can only be a LocationTag and defaults to the debug block's location if unspecified.
- debug blocks can't be cleared.
Related TagsNone
Usage Example
# Use to show a debug block where the player is looking.
- debugblock <player.cursor_on>
Usage Example
# Use to show a transparent green debug block in front of the player for five seconds.
- debugblock <player.eye_location.forward[2]> color:0,255,0,128 d:5s
Usage Example
# Use to remove all debug blocks,
- debugblock clear
Synonyms (Search Aid)gametestmarker
Groupplayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/DebugBlockCommand.java#L30
NameFish
Syntaxfish [<location>/stop] (catch:{none}/default/junk/treasure/fish) (chance:<#>)
Short DescriptionCauses an NPC to begin fishing around a specified location.
Full DescriptionCauses an NPC to begin fishing at the specified location.
Setting catch determines what items the NPC may fish up, and the chance is the odds of the NPC fishing up an item.
Related TagsNone
Usage Example
# Makes the NPC throw their fishing line out to where the player is looking, with a 50% chance of catching fish.
- fish <player.cursor_on> catch:fish chance:50
Usage Example
# Makes the NPC stop fishing.
- fish stop
Groupnpc
RequiresCitizens
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/npc/FishCommand.java#L27
NameInventory
Syntaxinventory [open/close/copy/move/swap/set/keep/exclude/fill/clear/update/adjust <mechanism>:<value>/flag <name>(:<action>)[:<value>] (expire:<time>)] (destination:<inventory>) (origin:<inventory>/<item>|...) (slot:<slot>)
Short DescriptionEdits the inventory of a player, NPC, or chest.
Full DescriptionUse this command to edit the state of inventories.
By default, the destination inventory is the current attached player's inventory.

If you are copying, swapping, removing from (including via "keep" and "exclude"), adding to, moving, or filling inventories,
you'll need both destination and origin inventories.

Origin inventories may be specified as a list of ItemTags, but destinations must be actual InventoryTags.

Using "open", "clear", or "update" only require a destination.
"Update" also requires the destination to be a valid player inventory.

Using "close" closes any inventory that the currently attached player has opened.

The "adjust" option adjusts mechanisms on an item within a specific slot of an inventory (the "slot" parameter is required).
Note that this is only for items, it does NOT adjust the inventory itself. Use Command:adjust to adjust an inventory mechanism.

The "flag" option sets a flag on items, similar to Command:flag.
See also Language:flag system.

The "update" option will refresh the client's view of an inventory to match the server's view, which is useful to workaround some sync bugs.

Note that to add items to an inventory, you should usually use Command:give,
and to remove items from an inventory, you should usually use Command:take.

The slot argument can be any valid slot, see Language:Slot Inputs.
Related Tags<PlayerTag.inventory> Returns a InventoryTag of the player's current inventory. (...)
<PlayerTag.enderchest> Gets the player's enderchest inventory. (...)
<PlayerTag.open_inventory> Gets the inventory the player currently has open. If the player has no open (...)
<NPCTag.inventory> Returns the InventoryTag of the NPC.
<LocationTag.inventory> Returns the InventoryTag of the block at the location. If the (...)
Usage Example
# Use to open a chest inventory, at a location.
- inventory open d:<context.location>
Usage Example
# Use to open a virtual inventory with a title and some items.
- inventory open d:generic[size=27;title=BestInventory;contents=snowball|stick]
Usage Example
# Use to open another player's inventory.
- inventory open d:<[player].inventory>
Usage Example
# Use to remove all items from a chest, except any items in the specified list.
- inventory keep d:<context.location.inventory> o:snowball|ItemScript
Usage Example
# Use to remove all sticks and stones from the player's inventory.
- inventory exclude origin:stick|stone
Usage Example
# Use to clear the player's inventory entirely.
- inventory clear
Usage Example
# Use to swap two players' inventories.
- inventory swap d:<[playerOne].inventory> o:<[playerTwo].inventory>
Usage Example
# Use to adjust a specific item in the player's inventory.
- inventory adjust slot:5 "lore:Item modified!"
Usage Example
# Use to set a single stick into slot 10 of the player's inventory.
- inventory set o:stick slot:10
Usage Example
# Use to set a temporary flag on the player's held item.
- inventory flag slot:hand my_target:<player.cursor_on> expire:1d
Groupitem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/InventoryCommand.java#L105
NameLeash
Syntaxleash (cancel) [<entity>|...] (holder:<entity>/<location>)
Short DescriptionSticks a leash on target entity, held by a fence or another entity.
Full DescriptionAttaches a leash to the specified entity.
The leash may be attached to a fence, or another entity.
Players and Player NPCs may not be leashed.
Note that releasing a mob from a fence post may leave the leash attached to that fence post.

Non-player NPCs can be leashed if '/npc leashable' is enabled.
Related Tags<EntityTag.is_leashed> Returns whether the entity is leashed.
<EntityTag.leash_holder> Returns the leash holder of entity.
Usage Example
# Use to attach a leash to the player's target.
- leash <player.target> holder:<player>
Usage Example
# Use to attach the closest cow in 10 blocks to the fence the player is looking at.
- leash <player.location.find_entities[cow].within[10].first> holder:<player.cursor_on>
Usage Example
# Use to release the target entity.
- leash cancel <player.target>
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/LeashCommand.java#L27
NameModifyBlock
Syntaxmodifyblock [<location>|.../<ellipsoid>/<cuboid>] [<material>|...] (no_physics/naturally:<tool>) (delayed) (<script>) (<percent chance>|...) (source:<player>) (max_delay_ms:<#>)
Short DescriptionModifies blocks.
Full DescriptionChanges blocks in the world based on the criteria given.

Use 'no_physics' to place the blocks without physics taking over the modified blocks.
This is useful for block types such as portals or water. This does NOT control physics for an extended period of time.

Specify (<percent chance>|...) to give a chance of each material being placed (in any material at all).

Use 'naturally:' when setting a block to air to break it naturally, meaning that it will drop items. Specify the tool item that should be used for calculating drops.

Use 'delayed' to make the modifyblock slowly edit blocks at a time pace roughly equivalent to the server's limits.
Optionally, specify 'max_delay_ms' to control how many milliseconds the 'delayed' set can run for in any given tick (defaults to 50).

Note that specifying a list of locations will take more time in parsing than in the actual block modification.

Optionally, specify a script to be ran after the delayed edits finish. (Doesn't fire if delayed is not set.)

Optionally, specify a source player. When set, Bukkit events will fire that identify that player as the source of a change, and potentially cancel the change.
The source argument might cause weird interoperation with other plugins, use with caution.

The modifyblock command is ~waitable. Refer to Language:~waitable.
Related Tags<LocationTag.material> Returns the material of the block at the location.
Usage Example
# Use to change the block a player is looking at to stone.
- modifyblock <player.cursor_on> stone
Usage Example
# Use to modify an entire cuboid to half stone, half dirt.
- modifyblock <player.location.to_cuboid[<player.cursor_on>]> stone|dirt
Usage Example
# Use to modify an entire cuboid to some stone, some dirt, and some left as it is.
- modifyblock <player.location.to_cuboid[<player.cursor_on>]> stone|dirt 25|25
Usage Example
# Use to modify the ground beneath the player's feet.
- modifyblock <player.location.add[2,-1,2].to_cuboid[<player.location.add[-2,-1,-2]>]> RED_WOOL
Synonyms (Search Aid)setblock, changeblock, placeblock, breakblock
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/ModifyBlockCommand.java#L62
NameShowFake
Syntaxshowfake [<material>|.../cancel] [<location>|...] (players:<player>|...) (d:<duration>{10s})
Short DescriptionMakes the player see a block change that didn't actually happen.
Full DescriptionMakes the player see a block change that didn't actually happen.
This means that the server will still register the block being what it was before the command,
and players not included in the command will still see the original block.

You must specify a location (or list of locations), and a material (or list of materials).
The material list does not have to be of the same size as the location list (materials will be repeated automatically).

Optionally, specify a list of players to show the change to.
If unspecified, will default to the linked player.

Optionally, specify how long the fake block should remain for.
If unspecified, will default to 10 seconds.
After the duration is up, the block will revert back to whatever it really is (on the server-side).

Note that while the player will see the block as though it were real, the server will have no knowledge of this.
This means that if the player, for example, stands atop a fake block that the server sees as air, that player will be seen as flying.
The reverse applies as well: if a player walks through fake air (that is actually solid), the server will see a player walking through walls.
This can easily lead to players getting kicked by anti-cheat systems or similar results.
You can enable the player to walk through fake air via Mechanism:PlayerTag.noclip.
Note as well that some clientside block effects may occur (eg fake fire may appear momentarily to actually ignite things, but won't actually damage them).

Warning: extremely complex chunks (those with a significant variety of block types in a small area) might not be able to retain fake blocks over time properly.
Related Tags<PlayerTag.fake_block_locations> Returns a list of locations that the player will see a fake block at, as set by Command:showfake or connected commands.
<PlayerTag.fake_block[<location>]> Returns the fake material that the player will see at the input location, as set by Command:showfake or connected commands. (...)
Usage Example
# Use to place a fake gold block at where the player is looking
- showfake gold_block <player.cursor_on>
Usage Example
# Use to place a stone block right on player's head, that only stays for a second.
- showfake stone <player.location.add[0,1,0]> duration:1s
Usage Example
# Use to place fake lava that the player is standing in, for all the server to see
- showfake lava <player.location> players:<server.online_players>
Synonyms (Search Aid)fakeblock
Groupplayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ShowFakeCommand.java#L31
NameSit
Syntaxsit (<location>)
Short DescriptionCauses the NPC to sit. To make them stand, see Command:Stand.
Full DescriptionMakes the linked NPC sit at the specified location.
Use Command:Stand to make the NPC stand up again.
Related Tags<NPCTag.is_sitting> Returns true if the NPC is sitting. Relates to Command:sit.
Usage Example
# Make the linked NPC sit at the player's cursor location.
- sit <player.cursor_on>
Groupnpc
RequiresCitizens
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/npc/SitCommand.java#L23
Namesleep
Syntaxsleep (<location>)
Short DescriptionCauses the NPC to sleep. To make them wake up, see Command:Stand.
Full DescriptionMakes the linked NPC sleep at the specified location.
Use Command:Stand to make the NPC wake back up.
Related Tags<NPCTag.is_sleeping> Returns true if the NPC is sleeping. Relates to Command:sleep.
Usage Example
# Make the linked NPC sleep at the player's cursor location.
- sleep <player.cursor_on>
Groupnpc
RequiresCitizens
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/npc/SleepCommand.java#L24
NameSwitch
Syntaxswitch [<location>|...] (state:{toggle}/on/off) (duration:<value>) (no_physics)
Short DescriptionSwitches state of the block.
Full DescriptionChanges the state of a block at the given location, or list of blocks at the given locations.

Optionally specify "state:on" to turn a block on (or open it, or whatever as applicable) or "state:off" to turn it off (or close it, etc).
By default, will toggle the state (on to off, or off to on).

Optionally specify the "duration" argument to set a length of time after which the block will return to the original state.

Works on any interactable blocks, including:
- the standard toggling levers, doors, gates...
- Single-use interactables like buttons, note blocks, dispensers, droppers, ...
- Redstone interactables like repeaters, ...
- Special interactables like tripwires, ...
- Bells as a special case will ring when you use 'switch' on them, ...
- Almost any other block with an interaction handler.

This will generally (but not always) function equivalently to a user right-clicking the block
(so it will open and close doors, flip levers on and off, press and depress buttons, ...).

Optionally specify 'no_physics' to not apply a physics update after switching.
Related Tags<LocationTag.switched> Returns whether the block at the location is considered to be switched on. (...)
<MaterialTag.switched> Returns whether a material is 'switched on', which has different semantic meaning depending on the material type. (...)
Usage Example
# At the player's location, switch the state of the block to on, no matter what state it was in before.
- switch <player.location> state:on
Usage Example
# Opens a door that the player is looking at.
- switch <player.cursor_on> state:on
Usage Example
# Toggle a block at the player's foot location.
- switch <player.location>
Synonyms (Search Aid)toggle, lever, activate, power, redstone
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/SwitchCommand.java#L37
NameTeleport
Syntaxteleport (<entity>|...) [<location>] (cause:<cause>) (entity_options:<option>|...) (relative) (relative_axes:<axis>|...) (offthread_repeat:<#>) (offthread_yaw) (offthread_pitch)
Short DescriptionTeleports the entity(s) to a new location.
Full DescriptionTeleports the entity or entities to the new location.
Entities can be teleported between worlds using this command.
You may optionally specify a teleport cause for player entities, allowing proper teleport event handling. When not specified, this is "PLUGIN". See Language:teleport cause for causes.

Instead of a valid entity, an unspawned NPC or an offline player may also be used.

Optionally specify "relative" to use relative teleportation (Paper only). This is primarily useful only for players, but available for all entities.
Relative teleports are smoother for the client when teleporting over short distances.
Optionally, you may use "relative_axes:" to specify a set of axes to move relative on (and other axes will be treated as absolute), as any of "X", "Y", "Z", "YAW", "PITCH".
Optionally, you may use "offthread_repeat:" with the relative arg when teleporting a player to smooth out the teleport with a specified number of extra async packets sent within a single tick.
Optionally, specify "offthread_yaw" or "offthread_pitch" while using offthread_repeat to smooth the player's yaw/pitch to the new location's yaw/pitch.

Optionally, specify additional teleport options using the 'entity_options:' arguments (Paper only).
This allows things like retaining an open inventory when teleporting - see the links below for more information.
See 🔗https://jd.papermc.io/paper/1.19/io/papermc/paper/entity/TeleportFlag.EntityState.html for all possible options.
Note that the API this is based on is marked as experimental in Paper, and so may change in the future.
Related Tags<EntityTag.location> Returns the location of the entity. (...)
Usage Example
# Use to teleport a player to the location their cursor is pointing at.
- teleport <player> <player.cursor_on>
Usage Example
# Use to teleport a player high above.
- teleport <player> <player.location.above[200]>
Usage Example
# Use to teleport to a random online player.
- teleport <player> <server.online_players.random.location>
Usage Example
# Use to teleport all players to your location.
- teleport <server.online_players> <player.location>
Usage Example
# Use to teleport the NPC to a location that was noted with the <@link command note> command.
- teleport <npc> my_prenoted_location
Usage Example
# Use to teleport a player to some location, and inform events that it was caused by a nether portal.
- teleport <player> <server.flag[nether_hub_location]> cause:nether_portal
Usage Example
# Use to teleport the player without closing their currently open inventory.
- teleport <player> <player.location.below[5]> entity_options:retain_open_inventory
Synonyms (Search Aid)tp
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/TeleportCommand.java#L39