Name | Flag |
Related Guide Page | https://guide.denizenscript.com/guides/basics/flags.html |
Syntax | flag [<object>|...] [<name>([<#>])](:<action>)[:<value>] (expire:<time>) |
Short Description | Sets or modifies a flag on any flaggable object. |
Full Description | The flag command sets or modifies custom data values stored on any flaggable object (the server, a player/NPC/entity, a block location, ...).
See also flag system. This command supports data actions, see data actions. Flags by default are added permanently (or for the lifetime of the object they're attached to). You can optionally specify a system time the flag will expire at, using either a DurationTag or a TimeTag. If a DurationTag is used, it will be equivalent to: <util.time_now.add[<your_duration_here>]> |
Related Tags | <FlaggableObject.flag[<flag_name>]> Returns the specified flag from the flaggable object. (...)
<FlaggableObject.has_flag[<flag_name>]> Returns true if the flaggable object has the specified flag, otherwise returns false. (...)
<FlaggableObject.flag_expiration[<flag_name>]> Returns a TimeTag indicating when the specified flag will expire. (...)
<FlaggableObject.list_flags> Returns a list of the flaggable object's flags. (...)
<server.online_players_flagged[<flag_name>]> Returns a list of all online players with a specified flag set. (...)
<server.players_flagged[<flag_name>]> Returns a list of all players (online or offline) with a specified flag set. (...)
<server.spawned_npcs_flagged[<flag_name>]> Returns a list of all spawned NPCs with a specified flag set. (...)
<server.npcs_flagged[<flag_name>]> Returns a list of all NPCs with a specified flag set. (...)
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/FlagCommand.java#L88 |