Denizen Script Meta Documentation Search


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

Perfect Name Match Results



Command


NameAnimate
Syntaxanimate [<entity>|...] [animation:<name>] (for:<player>|...)
Short DescriptionMakes a list of entities perform a certain animation.
Full DescriptionMinecraft implements several player and entity animations which the animate command can use, just
specify an entity and an animation.

Player animations require a Player-type entity or NPC. Available player animations include:
ARM_SWING, HURT, CRIT, MAGIC_CRIT, SIT, SLEEP, SNEAK, STOP_SITTING, STOP_SLEEPING, STOP_SNEAKING,
START_USE_MAINHAND_ITEM, START_USE_OFFHAND_ITEM, STOP_USE_ITEM, EAT_FOOD, ARM_SWING_OFFHAND

All entities also have available Bukkit's entity effect list:
🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/EntityEffect.html
These EntityEffect options can optionally be played only for specific players with the "for:" argument input.

In addition, Denizen adds a few new entity animations:
SKELETON_START_SWING_ARM, SKELETON_STOP_SWING_ARM,
POLAR_BEAR_START_STANDING, POLAR_BEAR_STOP_STANDING,
HORSE_BUCK, HORSE_START_STANDING, HORSE_STOP_STANDING,
IRON_GOLEM_ATTACK,
VILLAGER_SHAKE_HEAD,
SWING_MAIN_HAND, SWING_OFF_HAND

Note that the above list only applies where logical, EG 'WOLF_' animations only apply to wolves.

In versions 1.20+, to specify the direction of damage for the HURT animation, use Mechanism:EntityTag.play_hurt_animation
Related TagsNone
Usage Example
# Use to make a player appear to get hurt.
- animate <player> animation:hurt
Usage Example
# Use to make a wolf NPC shake.
- animate <npc> animation:wolf_shake
Groupentity
RequiresCitizens
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/AnimateCommand.java#L29

Partial Name Match Results


NameAnimateChest
Syntaxanimatechest [<location>] ({open}/close) (sound:{true}/false) (<player>|...)
Short DescriptionMakes a chest appear to open or close.
Full DescriptionThis command animates a chest at a specified location in the world opening or closing.
By default, the chest will animate opening.
Optionally, specify whether to play a sound with the animation. By default this will play.
Optionally, specify a player or list of players that the animation should be visible to.
By default, only the linked player can see the animation.

Note that this uses a generic 'block action' packet internally,
which means other block types may also react to this command.
Related TagsNone
Usage Example
# Use to animate a chest opening, which only the linked player will see.
- animatechest <context.location>
Usage Example
# Use to then animate a chest closing, which only the linked player will see.
- animatechest <context.location> close
Usage Example
# Use to animate a chest opening with no sound, which only the linked player will see.
- animatechest <context.location> sound:false
Usage Example
# Use to animate a chest opening that only a single specific player will see.
- animatechest <context.location> sound:false <[someplayer]>
Usage Example
# Use to animate a chest opening that only a list of specific players will see.
- animatechest <context.location> sound:false <[someplayer]>|<[player]>|<[thatplayer]>
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/AnimateChestCommand.java#L30

Event


Nameplayer animates animation
Event Lines player animates (<animation>)
Triggerswhen a player performs an animation.
Generated Examplesafter player animates:
on player animates animation:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switcheswith:<item> to only run if an item being swung by a swing animation matches the item-matcher.
Contexts<context.animation> returns the name of the animation, from 🔗https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/player/PlayerAnimationType.html.
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/PlayerAnimatesScriptEvent.java#L17

Tag


Name<DiscordReactionTag.is_animated>
ReturnsElementTag
DescriptionReturns whether the emote reacted is animated (an "animoji").
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordReactionTag.java#L253

Semi-Decent Match Results



Command


NameMap
Syntaxmap [<#>/new:<world>] (reset:<location>/reset_to_blank) (scale:<value>) (tracking) (image:<file>) (resize) (script:<script>) (dot:<color>) (radius:<#>) (x:<#>) (y:<#>) (text:<text>) (width:<#>) (height:<#>)
Short DescriptionModifies a new or existing map by adding images or text.
Full DescriptionThis command modifies an existing map, or creates a new one. Using this will override existing non-Denizen map renderers with Denizen's custom map renderer.

You must specify at least one of 'reset', 'reset_to_blank', 'script', 'image', 'dot', 'text'. You can specify multiple at once if you prefer.

When using 'reset' or 'reset_to_blank', you can specify optionally 'scale' and/or 'tracking'.
When using 'image' you can optionally specify 'resize' or 'width:<#>' and 'height:<#>'.
When using 'dot', you can specify any valid ColorTag (it will be compressed to map's color space), and you can optionally also specify 'radius' as a number.
Use "radius:0" with dot to set on a single pixel. 1 or higher will make a circle centered on the x/y given.

You can reset this at any time by using the 'reset:<location>' argument, which will remove all
images and texts on the map and show the default world map at the specified location.
You can also specify 'reset_to_blank' to reset without specified location.

The 'scale' argument takes input of one of the values listed here:
🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/map/MapView.Scale.html

The 'tracking' argument determines if the map will track its location on the map it displays.
This is often the player holding the map's location.

Note that all maps have a size of 128x128.

The file path is relative to the 'plugins/Denizen/images/' folder.
Instead of a local file path, an http(s) URL can be used, which will automatically download the image from the URL given.
If the file path points to a .gif, the map will automatically be animated.

Use escaping to let the image and text arguments have tags based on the player viewing the map.

Custom maps will persist over restarts using the 'maps.yml' save file in the Denizen plugins folder.
Related Tags<entry[saveName].created_map> returns the map created by the 'new:' argument if used.
Usage Example
# Use to add an auto-resized background image to map 3.
- map 3 image:my_map_images/my_background.png resize
Usage Example
# Use to add an image with the top-left corner at the center of a new map.
- map new:WorldTag image:my_map_images/my_center_image.png x:64 y:64 save:map
- give filled_map[map=<entry[map].created_map>]
Usage Example
# Use to reset map 3 to be centered at the player's location.
- map 3 reset:<player.location>
Usage Example
# Use to remove any custom renderers on map 3 and then apply the contents of the named <@link language Map Script Containers> to map 3.
- map 3 script:Map_Script_Name
Groupitem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/MapCommand.java#L30

Language


NameCommand Syntax
DescriptionAlmost every Denizen command and requirement has arguments after the command itself.
These arguments are just snippets of text showing what exactly the command should do,
like what the chat command should say, or where the look command should point.
But how do you know what to put in the arguments?

You merely need to look at the command's usage/syntax info.
Let's take for example:

- animatechest [<location>] ({open}/close) (sound:{true}/false)

Obviously, the command is 'animatechest'... but what does the rest of it mean?

Anything in [brackets] is required... you MUST put it there.
Anything in (parenthesis) is optional... you only need to put it there if you want to.
Anything in {braces} is default... the command will just assume this if no argument is actually typed.
Anything in <> is non-literal... you must change what is inside of it.
Anything outside of <> is literal... you must put it exactly as-is.
<#> represents a number without a decimal, and <#.#> represents a number with a decimal
Lastly, input that ends with "|..." (EG, [<entity>|...] ) can take a list of the input indicated before it (In that example, a list of entities)
An argument that contains a ":" (like "duration:<value>") is a prefix:value pair. The prefix is usually literal and the value dynamic. The prefix and the colon should be kept directly in the final command.

A few examples:
[<location>] is required and non-literal... you might fill it with a noted location, or a tag that returns one like '<player.location>'.
(sound:{true}/false) is optional and has a default value of true... you can put sound:false to prevent sound, or leave it blank to allow sound.
(repeats:<#>) is optional, has no clear default, and is a number. You can put repeats:3 to repeat three times, or leave it blank to not repeat.
Note: Optional arguments without a default usually have a secret default... EG, the (repeats:<#>) above has a secret default of '0'.

Also, you should never directly type in [], (), {}, or <> even though they are in the syntax info.
The only exception is in a replaceable tag (EG: <npc.has_trait[<traitname>]> will take <npc.has_trait[mytrait]> as a valid actual usage)

Highly specific note: <commands> means a block of commands wrapped in braces or as a sub-block... EG:

- repeat 3:
  - narrate "<[value]>"
  - narrate "everything spaced out as a sub-block (these two narrates) following a ":" ended command (that repeat) is for the <commands> input!"
GroupScript Command System
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/CommandRegistry.java#L45
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

Mechanism


Nameplay_hurt_animation
ObjectEntityTag
InputElementTag(Decimal)
DescriptionPlays a hurt animation that makes the living entity flash red. When the entity is a player, you can change the direction the camera rotates.
Damage direction is relative to the player, where 0 is in front, 90 is to the right, 180 is behind, and 270 is to the left.
For versions 1.19 or below, use Command:animate.
Example
# The player's camera will rotate as if the player took damage from the right and the player will flash red.
- adjust <player> play_hurt_animation:90
Example
# This will flash the entity red as if it took damage.
- adjust <[entity]> play_hurt_animation:0
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L3287

Tag


Name<BigDoorsDoorTag.is_busy>
ReturnsElementTag(Boolean)
DescriptionReturns whether the door is busy (currently animated/opening/closing).
RequiresDepenizen, Big Doors
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/objects/bigdoors/BigDoorsDoorTag.java#L120

Just Barely Matched Results



Command


NameFakeInternalData
Syntaxfakeinternaldata [entity:<entity>] [data:<map>|...] (for:<player>|...) (speed:<duration>)
Short DescriptionSends fake entity data updates, optionally animating them with sub-tick precision.
Full DescriptionSends fake internal entity data updates, optionally sending multiple over time.
This supports sub-tick precision, allowing smooth/high FPS animations.

The input to 'data:' is a list of ObjectType:MapTags, with each map being a frame to send; see Language:Internal Entity Data for more information.

Optionally specify a list of players to fake the data for, defaults to the linked player.

'speed:' is the amount of time between each frame getting sent, supporting sub-tick delays.
Note that this is the delay between each frame, regardless of their content (see examples).
Related TagsNone
Usage Example
# Animates an item display entity's item for the linked player, and slowly scales it up.
- fakeinternaldata entity:<[item_display]> data:[item=iron_ingot;scale=0.6,0.6,0.6]|[item=gold_ingot;scale=0.8,0.8,0.8]|[item=netherite_ingot;scale=1,1,1] speed:0.5s
Usage Example
# Changes an item display's item, then its scale a second later, then its item again another second later.
- fakeinternaldata entity:<[item_display]> data:[item=stone]|[scale=2,2,2]|[item=waxed_weathered_cut_copper_slab] speed:1s
Usage Example
# Animates a rainbow glow on a display entity for all online players.
- define color <color[red]>
- repeat 256 from:0 as:hue:
  - define frames:->:[glow_color=<[color].with_hue[<[hue]>].argb_integer>]
- fakeinternaldata entity:<[display]> data:<[frames]> for:<server.online_players> speed:0.01s
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/FakeInternalDataCommand.java#L46