Denizen Script Meta Documentation Search


Learn about how Denizen works in The Beginner's Guide.
Showing 36 search results for permission out of 3928 meta-documentation entries...

Perfect Name Match Results



Command


NamePermission
Syntaxpermission [add/remove] [permission] (group:<name>) (<world>)
Short DescriptionGives or takes a permission node to/from the player or group.
Full DescriptionAdds or removes a permission node from a player or group.
Accepts a world for world-based permissions plugins.
By default changes the attached player's permissions.
Accepts the 'group:<name>' argument to change a group's permission nodes rather than a player's.
Note: This requires a permissions plugin and Vault.
Related Tags<PlayerTag.has_permission[permission.node]> Returns whether the player has the specified node. (...)
<PlayerTag.has_permission[permission.node].global> Returns whether the player has the specified node, regardless of world. (...)
<PlayerTag.has_permission[permission.node].world[<world>]> Returns whether the player has the specified node in regards to the (...)
<server.has_permissions> Returns whether the server has a known permission plugin loaded. (...)
Usage Example
# Use to give the player a permissions node.
- permission add bukkit.version
Usage Example
# Use to remove a permissions node from a player.
- permission remove bukkit.version
Usage Example
# Use to give the group 'Members' a permission node.
- permission add bukkit.version group:Members
Usage Example
# Use to remove a permissions node from the group 'Members' in the Creative world.
- permission remove bukkit.version group:Members Creative
Groupplayer
RequiresVault
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/PermissionCommand.java#L24

Partial Name Match Results



Language


NameDenizen Permissions
DescriptionThe following is a list of all permission nodes Denizen uses within Bukkit.

denizen.clickable # use the 'denizenclickable' command, which is automatically executed when using Command:clickable and for clickable chat triggers
denizen.basic # use the basics of the /denizen command
denizen.ex # use the /ex command
denizen.debug # use the /denizen debug command
denizen.submit # use the /denizen submit command

Additionally:
denizen.npc.health, denizen.npc.sneak,
denizen.npc.effect, denizen.npc.fish, denizen.npc.sleep, denizen.npc.stand,
denizen.npc.sit, denizen.npc.nameplate, denizen.npc.nickname, denizen.npc.trigger,
denizen.npc.assign, denizen.npc.constants, denizen.npc.pushable

However, we recommend just giving op to whoever needs to access Denizen - they can op themselves through Denizen anyway, why not save the trouble?
( EG, /ex execute as_server "op <player.name>" )
GroupConsole Commands
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/command/DenizenCommandHandler.java#L30

Mechanism


Nameregister_permission
Objectserver
InputMapTag
Related Tags<server.has_whitelist> Returns whether the server's whitelist is active.
DescriptionInput must be a map with the key 'name' set to the permission name.
Can also set 'description' to a description of the permission.
Can also set 'parent' to the name of the parent permission (must already be registered).
Can also set 'default' to any of 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/permissions/PermissionDefault.html to define default accessibility.
This mechanism should probably be executed during Event:server prestart.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L2009

Tag


Name<DiscordRoleTag.permissions>
ReturnsListTag
DescriptionReturns a list of permissions that the role provides for users. You can get a list of possible outputs here: 🔗https://ci.dv8tion.net/job/JDA5/javadoc/net/dv8tion/jda/api/Permission.html
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordRoleTag.java#L243
Name<DiscordUserTag.permissions[<group>]>
ReturnsListTag
DescriptionReturns a list of permissions that the user has in a certain group. You can get a list of possible outputs here: 🔗https://ci.dv8tion.net/job/JDA5/javadoc/net/dv8tion/jda/api/Permission.html
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordUserTag.java#L455
Name<LuckPermsGroupTag.has_permission[<permission.node>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the group has the specified permission node.
RequiresDepenizen, LuckPerms
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/objects/luckperms/LuckPermsGroupTag.java#L146
Name<PlayerTag.has_permission[permission.node].global>
ReturnsElementTag(Boolean)
DescriptionReturns whether the player has the specified node, regardless of world.
(Works with offline players)
(Note: this may or may not be functional with your permissions system.)
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1323
Name<PlayerTag.has_permission[permission.node].world[<world>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the player has the specified node in regards to the
specified world.
(Works with offline players)
(Note: This may or may not be functional with your permissions system.)
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1345
Name<PlayerTag.has_permission[permission.node]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the player has the specified node.
(May work with offline players, depending on your permissions system.)
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1313
Name<PlayerTag.townychat.has_permission[<channel_name>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the player has permissions to join the specified channel.
RequiresDepenizen, Towny
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/towny/TownyChatPlayerProperties.java#L98
Name<server.has_permissions>
ReturnsElementTag(Boolean)
DescriptionReturns whether the server has a known permission plugin loaded.
Note: should not be considered incredibly reliable.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1091
Name<server.permission_groups>
ReturnsListTag
DescriptionReturns a list of all permission groups on the server.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1231
Name<SkillAPIClassTag.needs_permission>
ReturnsElementTag(Boolean)
DescriptionReturns whether this SkillAPI class requires permission to profess as it.
RequiresDepenizen, SkillAPI
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/objects/skillapi/SkillAPIClassTag.java#L141

Semi-Strong Match Results



Command


NameGroup
Syntaxgroup [add/remove/set] [<group>] (<world>)
Short DescriptionAdds a player to, removes a player from, or sets a player's permissions group.
Full DescriptionControls a player's permission groups, which the ability to add, remove or set a player's groups.
The 'add' argument adds the player to the group and any parent groups,
and the 'remove' command does the opposite, removing the player from the group and any inheriting groups.
The set command removes all existing groups and sets the player's group.
Note: This requires a permissions plugin and Vault.
Related Tags<PlayerTag.in_group[<group>]> Returns whether the player is in the specified group. (...)
<PlayerTag.in_group[<group>].global> Returns whether the player has the group with no regard to the (...)
<PlayerTag.in_group[<group>].world> Returns whether the player has the group in regards to a specific world. (...)
<PlayerTag.groups[(<world>)]> Returns a list of all groups the player is in. (...)
<server.permission_groups> Returns a list of all permission groups on the server.
Usage Example
# Use to add a player to the Admin group.
- group add Admin
Usage Example
# Use to remove a player from the Moderator group.
- group remove Moderator
Usage Example
# Use to set a player to the Member group in the Creative world.
- group set Member Creative
Groupplayer
RequiresVault
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/GroupCommand.java#L24

Semi-Decent Match Results


NameAnnounce
Syntaxannounce [<text>] (to_ops/to_console/to_flagged:<flag_name>/to_permission:<node>) (format:<script>)
Short DescriptionAnnounces a message for everyone online to read.
Full DescriptionAnnounce sends a raw message to players.
Simply using announce with text will send the message to all online players using the Spigot broadcast system.
Specifying the 'to_ops' argument will narrow down the players in which the message is sent to ops only.
Alternatively, using the 'to_permission' argument will send the message to only players that have the specified permission node.
Or, using the 'to_flagged' argument will send the message to only players that have the specified flag.
You can also use the 'to_console' argument to make it so it only shows in the server console.

You can format the announcement with Language:Format Script Containers using the 'format' argument, or with the "announce" format type (see Language:Script Formats).

Note that the default announce mode (that shows for all players) relies on the Spigot broadcast system, which requires the permission "bukkit.broadcast.user" to see broadcasts.
Related TagsNone
Usage Example
# Use to send an important message to your players.
- announce 'Warning! This server will restart in 5 minutes!'
Usage Example
# Use to send a message to a specific 'group' of players.
- announce to_flagged:clan_subang '[<player.name>] Best clan ever!'
Usage Example
# Use to easily send a message to all online ops.
- announce to_ops '<player.name> requires help!'
Usage Example
# Use to send a message to just the console (Primarily for debugging / logging).
- announce to_console 'Warning- <player.name> broke a mob spawner at location <player.location>'
Groupserver
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/server/AnnounceCommand.java#L31
NameClickable
Syntaxclickable (<script>/cancel:<id>) (def:<element>|.../defmap:<map>/def.<name>:<value>) (usages:<#>) (for:<player>|...) (until:<duration>)
Short DescriptionGenerates a clickable command for players.
Full DescriptionGenerates a clickable command for players.

Generally, prefer to write a command script and simply "on_click[/yourcommandhere]" rather than using generated clickables.
Generated clickables are a utility intended to enable clickables that are restricted from being normally accessed without receiving a clickable message.

Specify a task script to run, or put an executable script section as sub-commands.

When running a task, optionally any definitions to pass.

When using a sub-section, the running commands will be in their own queue, but copy out the original queue's definitions and context source.

Optionally specify a maximum number of usages (defaults to unlimited).

Optionally specify a maximum duration it can be used for with 'until'.

If no duration is specified, the clickable will remain valid until the server stops or restarts.
WARNING: if you use clickables very often without a duration limit, this can lead to a memory leak.
Clickables that have a specified max duration will occasionally be cleaned from memory.

Optionally specify what players are allowed to use it. Defaults to unrestricted (any player that sees the click message may use it).
Note that it is possible for a player to find the generated command ID in their logs and send it to another player to "/" execute, so if you don't restrict player access it may be abused in that way.

This internally generates a command of the form "/denizenclickable <generated_id>".

Players will need the permission "denizen.clickable" to be able to use this.

You can cancel a clickable at any time via "cancel:<id>", where ID is the generated ID from saving the initial generated command.
Related Tags<entry[saveName].command> returns the command to use in "on_click".
<entry[saveName].id> returns the generate command's ID.
<ElementTag.on_click[<command>]> Adds a click command to the element, which makes the element execute the input command when clicked. (...)
Usage Example
# Use to generate a clickable that just narrates "hello there!" when clicked.
- clickable save:my_clickable:
    - narrate "Hello there!"
- narrate "Click <blue><element[here].on_click[<entry[my_clickable].command>]><reset>!"
Usage Example
# Use to generate a clickable message that will run a task script named 'test_script'.
- clickable test_script save:my_clickable
- narrate "Click <blue><element[here].on_click[<entry[my_clickable].command>]><reset>!"
Usage Example
# Use to generate a clickable message that will run a task script named 'reward_drop', that can be used by only the first person to click it.
- clickable reward_drop usages:1 save:reward
- announce "<blue><bold><element[Reward Here].on_click[<entry[reward].command>]><reset>!"
Usage Example
# Use to generate a clickable message exclusively for the linked player, that must be used within a minute.
- clickable your_secret def:quest3 for:<player> until:1m save:secretmessage
- narrate "Do you want to know the secret? <blue><element[Yes].on_click[<entry[secretmessage].command>]><reset> / No."
Usage Example
# Use to generate a clickable message and cancel it manually later.
- clickable test_script save:my_clickable save:myclickable
- narrate "Click <blue><element[here].on_click[<entry[my_clickable].command>]><reset> before you land!"
- waituntil rate:1s max:30s <player.is_on_ground>
- clickable cancel:<entry[myclickable].id>
Groupplayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ClickableCommand.java#L38
Namediscord
Related Guide Pagehttps://guide.denizenscript.com/guides/expanding/ddiscordbot.html
Syntaxdiscord [id:<id>] [disconnect/add_role/start_typing/remove_role/status (status:<status>) (activity:<activity>)/rename] (<value>) (message_id:<id>) (channel:<channel>) (user:<user>) (group:<group>) (role:<role>) (url:<url>)
Short DescriptionInteracts with Discord.
Full DescriptionInteracts with Discord.

Commands may fail if the bot does not have permission within the Discord group to perform them.

When setting the status of the Discord bot, the status argument can be: ONLINE, DND, IDLE, or INVISIBLE,
and the activity argument can be: PLAYING, STREAMING, LISTENING, or WATCHING.
Streaming activity requires a 'url:' input.

The command should always be ~waited for. See Language:~waitable.
Related Tags<discord[<bot_id>]> Returns the Discord bot for the given bot ID.
Usage Example
# Use to disconnect from Discord.
- ~discord id:mybot disconnect
Usage Example
# Use to add a role on a user in a Discord guild.
- ~discord id:mybot add_role user:<[user]> role:<[role]> group:<[group]>
Usage Example
# Use to remove a role on a user in a Discord guild.
- ~discord id:mybot remove_role user:<[user]> role:<[role]> group:<[group]>
Usage Example
# Use to set the online status of the bot, and clear the game status.
- ~discord id:mybot status "Minecraft" "status:ONLINE"
Usage Example
# Use to set the game status of the bot.
- ~discord id:mybot status "Minecraft" "status:ONLINE" "activity:PLAYING"
Usage Example
# Use to change the bot's nickname.
- ~discord id:mybot rename "<[nickname]>" group:<[group]>
Usage Example
# Use to give a user a new nickname.
- ~discord id:mybot rename "<[nickname]>" user:<[user]> group:<[group]>
Usage Example
# Use to start typing in a specific channel.
- ~discord id:mybot start_typing channel:<[channel]>
Groupexternal
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordCommand.java#L38
Namediscordcommand
Related Guide Pagehttps://guide.denizenscript.com/guides/expanding/ddiscordbot.html
Syntaxdiscordcommand (id:<bot>) [create/delete] (group:<group>) (name:<name>) (type:{slash}/user/message) (description:<description>) (options:<options>)
Short DescriptionManages Discord application commands.
Full DescriptionManages Discord application commands.

You can create a new command, edit the permissions of an existing command, or delete an existing command.

To create (or delete) a command in a specific Discord guild, use the "group" argument. If not present, a global command will be created. NOTE: Global commands take up to an hour to register.
When creating, both a name and description are required.

Commands can be slash commands - activated via typing "/", message commands - activated by right-clicking a message, or user commands - activated by right-clicking a user.
"Description" and "options" are only valid for slash commands.

The "options" argument controls the command parameters. It is a MapTag of ordered MapTags that can sometimes hold ordered MapTags. It is recommended to use Command:definemap or a data script key when creating commands.
All option MapTags must have "type", "name", and "description" keys, with an optional "required" key (defaulting to true). The "type" key can be one of: STRING, INTEGER, BOOLEAN, USER, CHANNEL, ROLE, MENTIONABLE, NUMBER, ATTACHMENT.
Additionally, the option map can include a "choices" key, which is a MapTag of ordered MapTags that have a "name" (what displays to the user) and a "value" (what gets passed to the client).
Instead of choices, the option map can also include an "autocomplete" key controlling whether dynamic suggestions can be provided to the client (defaulting to false). See Event:on discord command autocomplete.

Editing application command permissions has been moved to the "Integrations" section in the server settings.
Read more about it here: 🔗https://discord.com/blog/slash-commands-permissions-discord-apps-bots

You DO NOT need to create a command on startup every time! Once a command is created, it will persist until you delete it.
Using the "create" instruction on an existing command will update it.

Commands and replies to interactions have limitations. See 🔗https://gist.github.com/MinnDevelopment/b883b078fdb69d0e568249cc8bf37fe9.

See also Discord's internal API documentation for commands: 🔗https://discord.com/developers/docs/interactions/application-commands

Generally used alongside Command:discordinteraction

The command should usually be ~waited for. See Language:~waitable.
Related Tags<entry[saveName].command> returns the DiscordCommandTag of a command upon creation, when the command is ~waited for.
Usage Example
# Use to create a simple slash command without options and save it.
- ~discordcommand create group:<discord[mybot].group[Denizen]> name:hello "description:Hello world!" save:mycmd
- debug log <entry[mycmd].command.name>
Usage Example
# Use to create a global slash command with one option, using definemap.
- definemap options:
    1:
      type: string
      name: animal
      description: Your favorite animal
      required: true
- ~discordcommand id:mybot create name:animal "description:Pick your favorite!" options:<[options]>
Groupexternal
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordCommandCommand.java#L40
Namediscordcreatechannel
Syntaxdiscordcreatechannel (id:<bot>) [group:<group>] [name:<name>] (description:<description>) (type:<type>) (category:<category_id>) (position:<#>) (roles:<list>) (users:<list>)
Short DescriptionCreates text channels on Discord.
Full DescriptionCreates text channels on Discord.

This functionality requires the Manage Channels permission.

You can optionally specify the channel description (aka "topic") with the "description" argument.

You can optionally specify the channel type. Valid types are TEXT, NEWS, CATEGORY, and VOICE.
Only text and news channels can have a description.
Categories cannot have a parent category.

You can optionally specify the channel's parent category with the "category" argument.
By default, the channel will not be attached to any category.

You can optionally specify the channel's position in the list as an integer with the "position" argument.

You can optionally specify the roles or users that are able to view the channel.
The "roles" argument takes a list of DiscordRoleTags, and the "users" argument takes a list of DiscordUserTags.
Specifying either of these arguments will create a private channel (hidden for anyone not in the lists).

The command can be ~waited for. See Language:~waitable.
Related Tags<entry[saveName].channel> returns the DiscordChannelTag of a channel upon creation when the command is ~waited for.
Usage Example
# Use to create a channel in a category.
- discordcreatechannel id:mybot group:1234 name:my-channel category:5678
Usage Example
# Use to create a voice channel and log its name upon creation.
- ~discordcreatechannel id:mybot group:1234 name:very-important-channel type:voice save:stuff
- debug log "Created channel '<entry[stuff].channel.name>'"
Groupexternal
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordCreateChannelCommand.java#L30
Namediscordmessage
Related Guide Pagehttps://guide.denizenscript.com/guides/expanding/ddiscordbot.html
Syntaxdiscordmessage (id:<id>) [reply:<message>/edit:<message>/channel:<channel>/user:<user>] (<message>) (no_mention) (rows:<rows>) (embed:<embed>|...) (attach_files:<map>) (post_title:<name>)
Short DescriptionSends a message to a Discord channel.
Full DescriptionSends a message to a Discord channel.

Command may fail if the bot does not have permission within the Discord group to send a message in that channel.

You can send the message to: a channel, user, or in reply to a previous message.
If sending as a reply, optionally use "no_mention" to disable the default reply pinging the original user.

Channels can be specified as either a copied ID, or using any tag that returns a valid DiscordChannelTag.
To get IDs, enable "Developer Mode" in your Discord settings, then right click on the channel and press "Copy ID".

You can edit an existing message by using "edit:<message>".

You can use "attach_file_name:<name>" and "attach_file_text:<text>" to attach a text file with longer content than a normal message allows.
Alternatively, you can use "attach_files:<map>" to attach files as a MapTag of the name of the file to the text or a BinaryTag.

To send embeds, use "embed:<embed>|...".

You can use "rows" to attach action rows of components, such as buttons to the message, using ObjectType:DiscordButtonTag, and ObjectType:DiscordSelectionTag.

You can send a message into a Forum Channel with "post_title" specified to create a post in that forum.

The command can be ~waited for. See Language:~waitable.
Related Tags<entry[saveName].message> returns the DiscordMessageTag of the sent message, when the command is ~waited for.
<discord[mybot].group[Denizen].channel[bot-spam]> is an example of a tag that will return an appropriate channel object for a named channel in a named group.
Usage Example
# Use to message a Discord channel with a copied channel ID.
- discordmessage id:mybot channel:1234 "Hello world!"
Usage Example
# Use to reply to a message from a message received event.
- discordmessage id:mybot reply:<context.message> "Hello world!"
Usage Example
# Use to message an embed to a Discord channel.
- discordmessage id:mybot channel:1234 embed:<discord_embed[title=hi;description=this is an embed!]>
Usage Example
# Use to message a Discord channel and record the new message ID.
- ~discordmessage id:mybot channel:1234 "Hello world!" save:sent
- announce "Sent as <entry[sent].message.id>"
Usage Example
# Use to send a message to a user through a private channel.
- discordmessage id:mybot user:<[user]> "Hello world!"
Usage Example
# Use to send a short and simple text-file message to a channel.
- discordmessage id:mybot channel:<[channel]> attach_files:<map[quote.xml=<&lt>mcmonkey<&gt> haha text files amirite<n>gotta abuse em]>
Usage Example
# Use to send a message and attach a button to it.
- define my_button <discord_button.with_map[style=primary;id=my_button;label=Hello]>
- discordmessage id:mybot channel:<[channel]> rows:<[my_button]> "Hello world!"
Usage Example
# Use to send a message to a Discord channel, then edit it after 5 seconds.
- ~discordmessage id:mybot channel:<[channel]> "Hello world!" save:msg
- wait 5s
- discordmessage id:mybot edit:<entry[msg].message> "Goodbye!"
Usage Example
# Use to send multiple embeds in a single message
- ~discordmessage id:mybot channel:<[channel]> embed:<discord_embed[title=embed 1]>|<discord_embed[title=embed 2]>
Usage Example
# Use to send files in a single message, including an image file, using a MapTag.
- ~fileread path:my_information.yml save:info
- ~fileread path:my_image.png save:image
- definemap files:
    text.txt: Wow! Denizen is so cool!
    info.yml: <entry[info].data>
    my_image.png: <entry[image].data>
- ~discordmessage id:mybot channel:<[channel]> attach_files:<[files]>
Groupexternal
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordMessageCommand.java#L43
Namediscordreact
Related Guide Pagehttps://guide.denizenscript.com/guides/expanding/ddiscordbot.html
Syntaxdiscordreact (id:<bot>) (channel:<channel>) [message:<message>] [add/remove/clear] [reaction:<reaction>/all] (user:<user>)
Short DescriptionManages message reactions on Discord.
Full DescriptionManages message reactions on Discord.

The message can be a ObjectType:DiscordMessageTag, or just the message ID, with a channel ID also given.

You can add or remove reactions from the bot, or clear all reactions of a specific ID, or clear all reactions from a message entirely.

Reactions can be unicode symbols, or custom emoji IDs.

Optionally specify a user for 'remove' to remove only a specific user's reaction.

'Add' requires basic add-reaction permissions.
'Clear' requires 'manage messages' permission.

For custom emoji, the ID is the numeric ID. For default emoji, the ID is the unicode symbol of the emoji.
In both cases, you can copy the correct value by typing the emoji into Discord and prefixing it with a "\" symbol, like "\:myemoji:" and sending it - the sent message will show the internal form of the emoji.

The command can be ~waited for. See Language:~waitable.
Related Tags<DiscordMessageTag.reactions> Returns a list of reaction on this message.
Usage Example
# Use to react to a previously sent message.
- discordreact id:mybot message:<[some_message]> add reaction:<[my_emoji_id]>
Usage Example
# Use to remove a reaction from a previously sent message.
- discordreact id:mybot message:<[some_message]> remove reaction:<[some_reaction_emoji]>
Usage Example
# Use to clear all reactions from a message.
- discordreact id:mybot message:<[some_message]> clear reaction:all
Groupexternal
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordReactCommand.java#L33
Namenpcbossbar
Syntaxnpcbossbar (remove) (color:<color>) (options:<option>|...) (range:<#>) (style:<style>) (title:<title>) (progress:<progress>) (view_permission:<permission>) (visible:<true/false>)
Short DescriptionControls or removes the linked NPC's bossbar.
Full DescriptionControls or removes the linked NPC's bossbar.

Progress can be a number between 1 and 100 or 'health' to make it track the NPC's health.
Placeholder API/Citizens placeholders are supported.

Optionally specify a range around the NPC where the bossbar is visible, and/or a permission required to view it.
Input an empty view permission to remove it ('view_permission:').

Valid colors: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/boss/BarColor.html.
Valid styles: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/boss/BarStyle.html.
Valid options: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/boss/BarFlag.html.
Usage Example
# Makes the linked NPC's bossbar green, and changes its title.
- npcbossbar color:green "title:This bossbar is green!"
Usage Example
# Makes it so the linked NPC's bossbar can only be visible 5 blocks away from it.
- npcbossbar range:5
Usage Example
# Removes a specific NPC's bossbar.
- npcbossbar remove npc:<[theNPC]>
Groupnpc
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/npc/NPCBossBarCommand.java#L29

Language


NameChat Triggers
DescriptionChat Triggers are triggered when a player chats to the NPC (usually while standing close to the NPC and facing the NPC).

They can also be triggered by the command "/denizenclickable chat hello" (where 'hello' is replaced with the chat message). This is used for clickable triggers.
This option enforces all the same limitations as chatting directly, but unlike real chat, won't display the message in global chat when there's no match.
This requires players have the permission "denizen.clickable".

Interact scripts are allowed to define a list of possible messages a player may type and the scripts triggered in response.

Within any given step, the format is then as follows:

# Some identifier for the trigger, this only serves to make the sub-triggers unique, and sort them (alphabetically).
1:
    # The trigger message written by a player. The text between // must be typed by a player, the other text is filled automatically.
    trigger: /keyword/ othertext
    script:
    # Your code here
    - wait 1
    # use "<context.message>" for the exact text written by the player.
    - chat "<context.message> eh?"
# You can list as many as you want
2:
    # You can have multi-option triggers, separated by pipes (the "|" symbol). This example matches if player types 'hi', 'hello', OR 'hey'.
    trigger: /hi|hello|hey/
    script:
    - wait 1
    # use "<context.keyword>" for the specific word that was said.
    # this example will respond to players that said 'hi' with "hi there buddy!", 'hello' with "hello there buddy!", etc.
    - chat "<context.keyword> there buddy!"
3:
    # You can have regex triggers. This example matches when the player types any numbers.
    trigger: /regex:\d+/
    script:
    - wait 1
    # use "<context.keyword>" for the text matched by the regex matcher.
    - chat "<context.keyword> eh?"
4:
    # Use '*' as the trigger to match anything at all.
    trigger: /*/
    # Add this line to hide the "[Player -> NPC]: hi" initial trigger message.
    hide trigger message: true
    # Add this line to show the player chat message in the normal chat.
    show as normal chat: true
    script:
    # If you hide the trigger message but not show as normal chat, you might want to fill that spot with something else.
    - narrate "[Player -> NPC]: I don't know how to type the right thing"
    - wait 1
    - chat "Well type 'hello' or any number!"
    - narrate "Click <element[here].on_hover[click me!].on_click[/denizenclickable chat hello]> to auto-activate the 'hello' trigger!"
GroupNPC Interact Scripts
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/triggers/core/ChatTrigger.java#L40
NameCommand Script Containers
DescriptionCommand script containers allow you to register your own custom commands to the server.
This also allows the command to show up in the '/help' command, with some info on the command.

Note that existing names or aliases from other plugins will be overridden.
If you want to run a script at the same time as an existing command, see Event:on command.

The following is the format for the container.

The required keys are 'name:', 'description:', 'usage:', and 'script:'
All other keys can be excluded if unneeded.
If you are not intentionally setting a specific value for the other keys, it is
strongly recommended that you simply not include them at all.

Please note that 'name:' is the true name of the command (written by users),
and 'usage:' is for documentation in the '/help' command.
These two options should almost always show the same name.


Command scripts can be automatically disabled by adding "enabled: false" as a root key (supports any load-time-parseable tags).


# The name of the script doesn't matter, and will not affect the command in any way.
Command_Script_Name:

    type: command

    # The name of the command. This will be the default method for running the command, and will show in '/help'.
    # | All command scripts MUST have this key!
    name: mycmd

    # The description of the command. This will be shown in the '/help' command.
    # Multiple lines are acceptable, via <&nl> (the tag for a new line), but you should
    # make the first line a brief summary of what your command does.
    # | All command scripts MUST have this key!
    description: My command.

    # Correct usage for the command. This will show in the '/help' command.
    # This is NOT the name of the command, and it is NOT used to control input parsing. It is EXCLUSIVELY for '/help'.
    # | All command scripts MUST have this key!
    usage: /mycmd <&lt>myArg1<&gt>

    # A list of aliases for the command. These will be used as alternative ways to trigger the command, and will show in the '/help' command.
    # | Some command scripts might have this key, but it's optional.
    aliases:
    - myalias
    - mycommand

    # The permission node to check for permissions plugins. This will automatically
    # block players without the permission from accessing the command and help for
    # the command.
    # Note that you can include multiple permission nodes (a player only needs to have any one permission from the list)
    # by separating them with a semicolon, like: perm.one;perm.two;third.perm
    # | Most command scripts should have this key!
    permission: my.permission.node

    # The message to send to the player when they try to use the command without
    # permission. If this is not specified, the default Bukkit message will be sent.
    # Has "permission" def available.
    # | Most command scripts should NOT have this key, but it's available.
    permission message: Sorry, <player.name>, you can't use my command because you don't have the permission '<[permission]>'!

    # The procedure-based script that will be checked when a player or the console
    # is trying to view help for this command. This must always be determined true
    # or false. If there is no script, it's assumed that all players and the console
    # should be allowed to view the help for this command.
    # Available context: <context.server> returns whether the server is viewing the help (a player if false).
    # | Most command scripts should NOT have this key, but it's available.
    allowed help:
    - determine <player.has_flag[special_allowed_help_flag]||<context.server>>

    # You can optionally specify tab completions on a per-argument basis.
    # Available context:
    # <context.args> returns a list of input arguments.
    # <context.raw_args> returns all the arguments as raw text.
    # <context.server> returns whether the server is using tab completion (a player if false).
    # <context.alias> returns the command alias being used.
    # | This key is great to have when used well, but is not required.
    tab completions:
        # This will complete "alpha" and "beta" for the first argument
        1: alpha|beta
        # This will complete any online player name for the second argument
        2: <server.online_players.parse[name]>
        # This will allow flags "-a", "-b", or "-c" to be entered in the third, fourth, or fifth argument.
        3 4 5: -a|-b|-c
        # Any argument other than the ones explicitly listed will be handled here with a tab complete that just says 'StopTyping'.
        default: StopTyping

    # You can also optionally use the 'tab complete' key to build custom procedure-style tab complete logic
    # if the simply numeric argument basis isn't sufficient.
    # Has the same context available as 'tab completions'.
    # | Most scripts should leave this key off, though it can be useful to some.
    tab complete:
    - determine some|dynamic|logic|here

    # The script that will run when the command is executed.
    # No, you do not need '- determine fulfilled' or anything of the sort, since the command is fully registered.
    # Available context:
    # <context.args> returns a list of input arguments.
    # <context.raw_args> returns all the arguments as raw text.
    # <context.source_type> returns the source of the command. Can be: PLAYER, SERVER, COMMAND_BLOCK, or COMMAND_MINECART.
    # <context.alias> returns the command alias being used.
    # <context.command_block_location> returns the command block's location (if the command was run from one).
    # <context.command_minecart> returns the EntityTag of the command minecart (if the command was run from one).
    # | All command scripts MUST have this key!
    script:
    - narrate Yay!
    - narrate "My command worked!"
    - narrate "And I typed '/<context.alias> <context.raw_args>'!"
GroupScript Container System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/CommandScriptContainer.java#L28
NameScript Event Switches
DescriptionModern script events support the concept of 'switches'.
A switch is a specification of additional requirements in an event line other than what's in the event label it.

A switch consists of a name and a value input, and are can be added anywhere in an event line as "name:<value>".
For example, "on delta time secondly every:5:" is a valid event, where "delta time secondly" is the event itself, and "every:<#>" is a switch available to the event.

A traditional Denizen event might look like "on <entity> damaged",
where "<entity>" can be filled with "entity" or any entity type (like "player").
A switch-using event would instead take the format "on entity damaged" with switch "type:<entity type>"
meaning you can do "on entity damaged" for any entity, or "on entity damaged type:player:" for players specifically.
This is both more efficient to process and more explicit in what's going on, however it is less clear/readable to the average user, so it is not often used.
Some events may have switches for less-often specified data, and use the event line for other options.

There are also some standard switches available to every script event, and some available to an entire category of script events.

One switch available to every event is "server_flagged:<flag_name>", which requires that there be a server flag under the given name.
For example, "on console output server_flagged:recording:" will only run the handler for console output when the "recording" flag is set on the server.
This can also be used to require the server does NOT have a flag with "server_flagged:!<flag_name>"

"chance:<percent>" is also a globally available switch.
For example, "on player breaks diamond_ore chance:25:" will only fire on average one in every four times that a player breaks a diamond ore block.

Events that have a player linked have the "flagged" and "permission" switches available.

If the switch is specified, and an event doesn't have a linked player, the event will automatically fail to match.
The "flagged:<flag_name>" switch will limit the event to only fire when the player has the flag with the specified name.
It can be used like "on player breaks block flagged:nobreak:" (that would be used alongside "- flag player nobreak").
You can also use "flagged:!<flag_name>" to require the player does NOT have the flag, like "on player breaks block flagged:!griefbypass:"

The "permission:<perm key>" will limit the event to only fire when the player has the specified permission key.
It can be used like "on player breaks block permission:denizen.my.perm:"
For multiple flag or permission requirements, just list them separated by '|' pipes, like "flagged:a|b|c". This will require all named flags/permissions to be present, not just one.

Events that have an NPC linked have the "assigned" switch available.
If the switch is specified, and an event doesn't have a linked NPC, the event will automatically fail to match.
The "assigned:<script name>" switch will limit the event to only fire when the NPC has an assignment script that matches the given advanced matcher.

Events that occur at a specific location have the "in:<area>" and "location_flagged" switches.
This switches will be ignored (not counted one way or the other) for events that don't have a known location.
For "in:<area>" switches, 'area' is any area-defining tag type - refer to Language:Advanced Object Matchables.
"location_flagged:<flag name>" works just like "server_flagged" or the player "flagged" switches, but for locations.

All script events have priority switches (see Language:script event priority),
All Bukkit events have bukkit priority switches (see Language:bukkit event priority),
All cancellable script events have cancellation switches (see Language:script event cancellation).

See also Language:Advanced Object Matching.
GroupScript Events
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/BukkitScriptEvent.java#L97
NameThe Global If Argument
DescriptionThe "if:<boolean>" argument is a special meta-argument that is available for all commands, but is more useful for some than others.
It is written like:

- stop if:<player.has_flag[forbidden]>
# Equivalent to
- if <player.has_flag[forbidden]>:
  - stop


When the if argument is used, the command will only run if the value of the argument is 'true'.

The most useful place to have this is a 'stop' command, to quickly stop a script if a condition is true (a player has a flag, lacks a permission, is outside a region, or whatever else).

If you need more complex matching, especially using '&&', '||', '==', etc. you should probably just do an 'if' command rather than using the argument.
Though if you really want to, you can use tags here like Tag:objecttag.is.to or Tag:elementtag.and or Tag:elementtag.or.
GroupScript Command System
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/CommandExecutor.java#L50

Mechanism


Namementionable
ObjectDiscordRoleTag
InputElementTag(Boolean)
DescriptionAdjusts whether the specified role is mentionable by anyone (if not, can only be mentioned by users with mention-everyone permission).
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordRoleTag.java#L272
Namefake_op_level
ObjectPlayerTag
InputElementTag(Number)
DescriptionSends a fake operator level to the client, enabling clientside op-required features like the debug gamemode hotkey (F3+F4).
Input should be a number from 0 to 4, 0 indicating not op and 4 indicating maximum level op.
The input number value corresponds to "op-permission-level" in the server.properties. See also 🔗https://minecraft.wiki/w/Permission_level
This will be reset when a player rejoins, changes world, has their real op status changed, ...
Generated Example
- adjust <player> fake_op_level:1
Grouppaper
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/PaperPlayerExtensions.java#L134

Tag


Name<ElementTag.click_chat[<message>]>
ReturnsElementTag
DescriptionAdds a click command to the element, which makes the element pseudo-chat the input message when clicked, for activating interact script chat triggers (Language:Chat Triggers).
This internally uses the command "/denizenclickable chat SOME MESSAGE HERE" (requires players have permission "denizen.clickable")
Note that this is a magic Denizen tool - refer to Language:Denizen Text Formatting.
Example
- narrate "You can <element[click here].click_chat[hello]> to say hello to an NPC's interact script!"
Grouptext manipulation
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L517
Name<ElementTag.on_click[<command>]>
ReturnsElementTag
DescriptionAdds a click command to the element, which makes the element execute the input command when clicked.
To execute a command "/" should be used at the start. Prior to 1.19, leaving off the "/" would display the text as chat. This feature was removed as part of the 1.19 secure chat system.
For activating interact script chat triggers (Language:Chat Triggers), you can use the command "/denizenclickable chat SOME MESSAGE HERE" (requires players have permission "denizen.clickable")
For that, instead prefer Tag:ElementTag.click_chat
Note that this is a magic Denizen tool - refer to Language:Denizen Text Formatting.
Example
- narrate "You can <element[click here].on_click[/help]> for help!"
Example
- narrate "You can <element[click here].on_click[/denizenclickable chat hello]> to say hello to an NPC's interact script!"
Grouptext manipulation
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L532
Name<PlayerTag.groups[(<world>)]>
ReturnsListTag
DescriptionReturns a list of all groups the player is in.
May work with offline players, depending on permission plugin.
Generated Example
- foreach <player.groups> as:entry:
    - narrate "found <[entry]>"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1092
Name<PlayerTag.in_group[<group_name>].global>
ReturnsElementTag(Boolean)
DescriptionReturns whether the player has the group with no regard to the
player's current world.
(Works with offline players)
(Note: This may or may not be functional with your permissions system.)
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1264
Name<PlayerTag.in_group[<group_name>].world[<world>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the player has the group in regards to a specific world.
(Works with offline players)
(Note: This may or may not be functional with your permissions system.)
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1280
Name<PlayerTag.in_group[<group_name>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the player is in the specified group.
(May work with offline players, depending on your permissions system.)
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1247
Name<PluginTag.commands>
ReturnsMapTag(MapTag)
DescriptionGets a map of commands registered this plugin registers by default.
Note that dynamically registered commands won't show up (for example, command scripts won't be listed under Denizen).
Map key is command name, map value is a sub-mapping with keys:
description (ElementTag), usage (ElementTag), permission (ElementTag), aliases (ListTag)
Not all keys will be present.
For example, <plugin[denizen].commands.get[ex]> will return a MapTag with:
[description=Executes a Denizen script command.;usage=/ex (-q) <Denizen script command> (arguments);permission=denizen.ex]
Generated Example
- foreach <plugin[Denizen].commands> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PluginTag.java#L213

Just Barely Matched Results



Command


NameIf
Related Guide Pagehttps://guide.denizenscript.com/guides/basics/if-command.html
Syntaxif [<value>] (!)(<operator> <value>) (&&/|| ...) [<commands>]
Short DescriptionCompares values, and runs a subset of commands if they match.
Full DescriptionCompares values, and runs a subset of commands if they match.
Works with the else command, which handles alternatives for when the comparison fails.
The if command is equivalent to the English phrasing "if something is true, then do the following".

Values are compared using the comparable system. See Language:operator for information.

Comparisons may be chained together using the symbols '&&' and '||' or their text equivalents 'and' and 'or'.
'&&' means "and", '||' means "or".
So, for example "if <[a]> && <[b]>:" requires both a AND b to be true.
"if <[a]> and <[b]>:" also requires both a AND b to be true.

The "or" is inclusive, meaning "if <[a]> || <[b]>:" will pass for any of the following:
a = true, b = true
a = true, b = false
a = false, b = true
but will fail when a = false and b = false.

Sets of comparisons may be grouped using ( parens ) as separate arguments.
So, for example "if ( <[a]> && <[b]> ) || <[c]>", or "if ( <[x]> or <[y]> or <[z]> ) and ( <[a]> or <[b]> or <[c]> )"
Grouping is REQUIRED when using both '&&' and '||' in one line. Otherwise, groupings should not be used at all.

Boolean inputs and groups both support negating with the '!' symbol as a prefix.
This means you can do "if !<[a]>" to say "if a is NOT true".
Similarly, you can do "if !( <[a]> || <[b]> )", though be aware that per rules of boolean logic,
that example is the exactly same as "if !<[a]> && !<[b]>".

You can also use keyword "not" as its own argument to negate a boolean or an operator.
For example, "if not <[a]>:" will require a to be false, and "if <[a]> not equals <[b]>:" will require that 'a' does not equal 'b'.

When not using a specific comparison operator, true vs false will be determined by Truthiness, see Tag:ObjectTag.is_truthy for details.
For example, "- if <player||null>:" will pass if a player is linked, valid, and online.
Related Tags<ObjectTag.is[<operator>].to[<element>]> Takes an operator, and compares the first object to the given second object. (...)
<ObjectTag.is[<operator>].than[<element>]> Takes an operator, and compares the first object to the given second object. (...)
Usage Example
# Use to narrate a message only if a player has a flag.
- if <player.has_flag[secrets]>:
    - narrate "The secret number is 3!"
Usage Example
# Use to narrate a different message depending on a player's money level.
- if <player.money> > 1000:
    - narrate "You're rich!"
- else:
    - narrate "You're poor!"
Usage Example
# Use to stop a script if a player doesn't have all the prerequisites.
- if !<player.has_flag[quest_complete]> || !<player.has_permission[new_quests]> || <player.money> < 50:
    - narrate "You're not ready!"
    - stop
- narrate "Okay so your quest is to find the needle item in the haystack build next to town."
Usage Example
# Use to perform a complicated requirements test before before changing some event.
- if ( poison|magic|melting contains <context.cause> and <context.damage> > 5 ) or <player.has_flag[weak]>:
    - determine <context.damage.mul[2]>
Groupqueue
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/IfCommand.java#L28