Denizen Script Tags


Tags are always written with a <between these marks>, and are critical to scripts, as the primary way to read data.
Learn about how tags work in The Beginner's Guide.


Showing 22 out of 2484 tags...

Categories:

AreaObject | ChunkTag | FlaggableObject | server | LocationTag | ItemTag | PlayerTag



Category: AreaObject


Name<AreaObject.blocks_flagged[<flag_name>]>
ReturnsListTag(LocationTag)
DescriptionGets a list of all block locations with a specified flag within the area.
Searches the internal flag lists, rather than through all possible blocks.
Example
# Spawns a debugblock to highlight every block in the cuboid that has the location flag 'my_flag'.
- debugblock <cuboid[my_cuboid].blocks_flagged[my_flag]>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/AreaContainmentObject.java#L280



Category: ChunkTag


Name<ChunkTag.blocks_flagged[<flag_name>]>
ReturnsListTag(LocationTag)
DescriptionGets a list of all block locations with a specified flag within the CuboidTag.
Searches the internal flag lists, rather than through all possible blocks.
Example
# Spawns a debugblock to highlight every block in the chunk flagged "my_flag"
- debugblock <player.location.chunk.blocks_flagged[my_flag]>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ChunkTag.java#L716



Category: FlaggableObject


Name<FlaggableObject.flag[<flag_name>]>
ReturnsObjectTag
DescriptionReturns the specified flag from the flaggable object.
If the flag is expired, will return null.
Consider also using Tag:FlaggableObject.has_flag.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L37

Name<FlaggableObject.flag_expiration[<flag_name>]>
ReturnsTimeTag
DescriptionReturns a TimeTag indicating when the specified flag will expire.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L71

Name<FlaggableObject.flag_map[<name>|...]>
ReturnsMapTag
DescriptionReturns a raw map of the objects internal flag data for the flags with the given flag name. Names must be root names (no '.').
Output is a MapTag wherein each key is a flag name, and each value is a MapTag, containing keys '__value' and '__expiration', where '__value' contains the real object value.
Output also may contain key '__clear', which is a ListTag of flags that were listed in input but weren't present in output.
Using this without a parameter to get ALL flags is allowed exclusively for debug/testing reasons, and should never be used in a real script.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L104

Name<FlaggableObject.has_flag[<flag_name>]>
ReturnsElementTag(Boolean)
DescriptionReturns true if the flaggable object has the specified flag, otherwise returns false.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L55

Name<FlaggableObject.list_flags>
ReturnsListTag
DescriptionReturns a list of the flaggable object's flags.
Note that this is exclusively for debug/testing reasons, and should never be used in a real script.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L87



Category: server


Name<server.flag[<flag_name>]>
ReturnsObjectTag
DescriptionSee Tag:FlaggableObject.flag
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L606

Name<server.flag_expiration[<flag_name>]>
ReturnsTimeTag
DescriptionSee Tag:FlaggableObject.flag_expiration
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L597

Name<server.flag_map[<name>|...]>
ReturnsMapTag
DescriptionSee Tag:FlaggableObject.flag_map
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L626

Name<server.has_flag[<flag_name>]>
ReturnsElementTag(Boolean)
DescriptionSee Tag:FlaggableObject.has_flag
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L587

Name<server.list_flags>
ReturnsListTag
DescriptionSee Tag:FlaggableObject.list_flags
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L616

Name<server.npcs_flagged[<flag_name>]>
ReturnsListTag(NPCTag)
DescriptionReturns a list of all NPCs with a specified flag set.
Can use "!<flag_name>" style to only return NPCs *without* the flag.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L2396

Name<server.online_players_flagged[<flag_name>]>
ReturnsListTag(PlayerTag)
DescriptionReturns a list of all online players with a specified flag set.
Can use "!<flag_name>" style to only return players *without* the flag.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1312

Name<server.players_flagged[<flag_name>]>
ReturnsListTag(PlayerTag)
DescriptionReturns a list of all players (online or offline) with a specified flag set.
Warning: this will cause the player flag cache to temporarily fill with ALL historical playerdata.
Can use "!<flag_name>" style to only return players *without* the flag.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1337

Name<server.spawned_npcs_flagged[<flag_name>]>
ReturnsListTag(NPCTag)
DescriptionReturns a list of all spawned NPCs with a specified flag set.
Can use "!<flag_name>" style to only return NPCs *without* the flag.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L2371



Category: LocationTag


Name<LocationTag.find_blocks_flagged[<flag_name>].within[<#>]>
ReturnsListTag(LocationTag)
DescriptionReturns a list of blocks that have the specified flag within a radius.
Note: current implementation measures the center of nearby block's distance from the exact given location.
Result list is sorted by closeness (1 = closest, 2 = next closest, ... last = farthest).
Searches the internal flag lists, rather than through all possible blocks.
Groupfinding
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L2608



Category: ItemTag


Name<ItemTag.with_flag[<flag_set_action>]>
ReturnsItemTag
MechanismItemTag.flag
DescriptionReturns a copy of the item with the specified flag data action applied to it.
For example: <[item].with_flag[myflagname]>, or <[item].with_flag[myflag:myvalue]>, or <[item].with_flag[mycounter:+:<[amount]>]>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L53

Name<ItemTag.with_flag[<flag_set_action>].duration[<expire_duration>]>
ReturnsItemTag
MechanismItemTag.flag
DescriptionReturns a copy of the item with the specified flag data action (and the specified expiration duration) applied to it.
For example: <[item].with_flag[myflagname].duration[5m]>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L68



Category: PlayerTag


Name<PlayerTag.worldguard_flag[flag=<flag>(;location=<at>)]>
ReturnsObjectTag
DescriptionReturns the boolean state of a flag for that player at the specified location, defaults to player location.
For non-state tags, returns the current value of the flag.
Example
# Returns 'true' if the player can be attacked (according to WG) or 'false' if not.
- narrate <player.worldguard_flag[flag=pvp]>
RequiresDepenizen, WorldGuard
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/worldguard/WorldGuardPlayerExtensions.java#L110

Name<PlayerTag.worldguard.test_flag[<name>]>
ReturnsObjectTag
DescriptionDeprecated in favor of Tag:PlayerTag.worldguard_flag
RequiresDepenizen, WorldGuard
DeprecatedUse 'PlayerTag.worldguard_flag'
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/worldguard/WorldGuardPlayerExtensions.java#L51

Name<PlayerTag.worldguard.test_flag[<name>].at[<location>]>
ReturnsObjectTag
DescriptionDeprecated in favor of Tag:PlayerTag.worldguard_flag
RequiresDepenizen, WorldGuard
DeprecatedUse 'PlayerTag.worldguard_flag'
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/worldguard/WorldGuardPlayerExtensions.java#L70