Denizen Script Language Explanations


Language Explanations explain components of Denizen in a more direct and technical way than The Beginner's Guide.


Showing 1 out of 81 language explanations...
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