Skip to content

Has Tag

Entity Condition Type

Checks if the entity has a scoreboard tag (added via the /tag command).

Type ID: eggolib:has_tag

Note

If neither the tag or tags fields are specified, this entity condition type will check if the entity has any scoreboard tags.

Fields

Field Type Default Description
tag String optional If specified, checks if the entity has this scoreboard tag.
tags Array of Strings optional If specified, checks if the entity has these scoreboard tags.

Examples

"condition": {
    "type": "eggolib:has_tag",
    "tag": "example.tag"
}

This example will check if the entity has the example.tag scoreboard tag.

"condition": {
    "type": "eggolib:has_tag",
    "tags": [
        "tag_with_numbers123",
        "tagWithUppercasedLetters"
    ]
}

This example will check if the entity has the tag_with_numbers123 or the tagWithUppercasedLetters scoreboard tags.