permission out of 3928 meta-documentation entries...| Name | Permission |
| Syntax | permission [add/remove] [permission] (group:<name>) (<world>) |
| Short Description | Gives or takes a permission node to/from the player or group. |
| Full Description | Adds 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | player |
| Requires | Vault |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/PermissionCommand.java#L24 |
| Name | Denizen Permissions |
| Description | The following is a list of all permission nodes Denizen uses within Bukkit.
denizen.clickable # use the 'denizenclickable' command, which is automatically executed when using 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>" ) |
| Group | Console Commands |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/command/DenizenCommandHandler.java#L30 |
| Name | register_permission |
| Object | server |
| Input | MapTag |
| Related Tags | <server.has_whitelist> Returns whether the server's whitelist is active.
|
| Description | Input 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 server prestart. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L2009 |
| Name | <DiscordRoleTag.permissions> |
| Returns | ListTag |
| Description | Returns 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 |
| Requires | dDiscordBot |
| Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordRoleTag.java#L243 |
| Name | <DiscordUserTag.permissions[<group>]> |
| Returns | ListTag |
| Description | Returns 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 |
| Requires | dDiscordBot |
| Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordUserTag.java#L455 |
| Name | <LuckPermsGroupTag.has_permission[<permission.node>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the group has the specified permission node. |
| Requires | Depenizen, LuckPerms |
| Source | https://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> |
| Returns | ElementTag(Boolean) |
| Description | Returns 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.) |
| Source | https://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>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns 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.) |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1345 |
| Name | <PlayerTag.has_permission[permission.node]> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the player has the specified node.
(May work with offline players, depending on your permissions system.) |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1313 |
| Name | <PlayerTag.townychat.has_permission[<channel_name>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the player has permissions to join the specified channel. |
| Requires | Depenizen, Towny |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/towny/TownyChatPlayerProperties.java#L98 |
| Name | <server.has_permissions> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the server has a known permission plugin loaded.
Note: should not be considered incredibly reliable. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1091 |
| Name | <server.permission_groups> |
| Returns | ListTag |
| Description | Returns a list of all permission groups on the server. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1231 |
| Name | <SkillAPIClassTag.needs_permission> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether this SkillAPI class requires permission to profess as it. |
| Requires | Depenizen, SkillAPI |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/objects/skillapi/SkillAPIClassTag.java#L141 |
| Name | Group |
| Syntax | group [add/remove/set] [<group>] (<world>) |
| Short Description | Adds a player to, removes a player from, or sets a player's permissions group. |
| Full Description | Controls 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 | |
| Usage Example | |
| Usage Example | |
| Group | player |
| Requires | Vault |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/GroupCommand.java#L24 |
| Name | Announce |
| Syntax | announce [<text>] (to_ops/to_console/to_flagged:<flag_name>/to_permission:<node>) (format:<script>) |
| Short Description | Announces a message for everyone online to read. |
| Full Description | Announce 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 Format Script Containers using the 'format' argument, or with the "announce" format type (see 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 Tags | None
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | server |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/server/AnnounceCommand.java#L31 |
| Name | Clickable |
| Syntax | clickable (<script>/cancel:<id>) (def:<element>|.../defmap:<map>/def.<name>:<value>) (usages:<#>) (for:<player>|...) (until:<duration>) |
| Short Description | Generates a clickable command for players. |
| Full Description | Generates 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ClickableCommand.java#L38 |
| Name | discord |
| Related Guide Page | https://guide.denizenscript.com/guides/expanding/ddiscordbot.html |
| Syntax | discord [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 Description | Interacts with Discord. |
| Full Description | Interacts 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 ~waitable. |
| Related Tags | <discord[<bot_id>]> Returns the Discord bot for the given bot ID.
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | external |
| Requires | dDiscordBot |
| Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordCommand.java#L38 |
| Name | discordcommand |
| Related Guide Page | https://guide.denizenscript.com/guides/expanding/ddiscordbot.html |
| Syntax | discordcommand (id:<bot>) [create/delete] (group:<group>) (name:<name>) (type:{slash}/user/message) (description:<description>) (options:<options>) |
| Short Description | Manages Discord application commands. |
| Full Description | Manages 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 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 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 discordinteraction The command should usually be ~waited for. See ~waitable. |
| Related Tags | <entry[saveName].command> returns the DiscordCommandTag of a command upon creation, when the command is ~waited for.
|
| Usage Example | |
| Usage Example | |
| Group | external |
| Requires | dDiscordBot |
| Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordCommandCommand.java#L40 |
| Name | discordcreatechannel |
| Syntax | discordcreatechannel (id:<bot>) [group:<group>] [name:<name>] (description:<description>) (type:<type>) (category:<category_id>) (position:<#>) (roles:<list>) (users:<list>) |
| Short Description | Creates text channels on Discord. |
| Full Description | Creates 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 ~waitable. |
| Related Tags | <entry[saveName].channel> returns the DiscordChannelTag of a channel upon creation when the command is ~waited for.
|
| Usage Example | |
| Usage Example | |
| Group | external |
| Requires | dDiscordBot |
| Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordCreateChannelCommand.java#L30 |
| Name | discordmessage |
| Related Guide Page | https://guide.denizenscript.com/guides/expanding/ddiscordbot.html |
| Syntax | discordmessage (id:<id>) [reply:<message>/edit:<message>/channel:<channel>/user:<user>] (<message>) (no_mention) (rows:<rows>) (embed:<embed>|...) (attach_files:<map>) (post_title:<name>) |
| Short Description | Sends a message to a Discord channel. |
| Full Description | Sends 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 DiscordButtonTag, and 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 ~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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | external |
| Requires | dDiscordBot |
| Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordMessageCommand.java#L43 |
| Name | discordreact |
| Related Guide Page | https://guide.denizenscript.com/guides/expanding/ddiscordbot.html |
| Syntax | discordreact (id:<bot>) (channel:<channel>) [message:<message>] [add/remove/clear] [reaction:<reaction>/all] (user:<user>) |
| Short Description | Manages message reactions on Discord. |
| Full Description | Manages message reactions on Discord.
The message can be a 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 ~waitable. |
| Related Tags | <DiscordMessageTag.reactions> Returns a list of reaction on this message.
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | external |
| Requires | dDiscordBot |
| Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordReactCommand.java#L33 |
| Name | npcbossbar |
| Syntax | npcbossbar (remove) (color:<color>) (options:<option>|...) (range:<#>) (style:<style>) (title:<title>) (progress:<progress>) (view_permission:<permission>) (visible:<true/false>) |
| Short Description | Controls or removes the linked NPC's bossbar. |
| Full Description | Controls 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 | |
| Usage Example | |
| Usage Example | |
| Group | npc |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/npc/NPCBossBarCommand.java#L29 |
| Name | Chat Triggers |
| Description | Chat 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: |
| Group | NPC Interact Scripts |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/triggers/core/ChatTrigger.java#L40 |
| Name | Command Script Containers |
| Description | Command 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 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). |
| Group | Script Container System |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/CommandScriptContainer.java#L28 |
| Name | Script Event Switches |
| Description | Modern 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 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 script event priority), All Bukkit events have bukkit priority switches (see bukkit event priority), All cancellable script events have cancellation switches (see script event cancellation). See also Advanced Object Matching. |
| Group | Script Events |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/BukkitScriptEvent.java#L97 |
| Name | The Global If Argument |
| Description | The "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:
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 objecttag.is.to or elementtag.and or elementtag.or. |
| Group | Script Command System |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/CommandExecutor.java#L50 |
| Name | mentionable |
| Object | DiscordRoleTag |
| Input | ElementTag(Boolean) |
| Description | Adjusts whether the specified role is mentionable by anyone (if not, can only be mentioned by users with mention-everyone permission). |
| Requires | dDiscordBot |
| Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordRoleTag.java#L272 |
| Name | fake_op_level |
| Object | PlayerTag |
| Input | ElementTag(Number) |
| Description | Sends 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 | |
| Group | paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/PaperPlayerExtensions.java#L134 |
| Name | <ElementTag.click_chat[<message>]> |
| Returns | ElementTag |
| Description | Adds a click command to the element, which makes the element pseudo-chat the input message when clicked, for activating interact script chat triggers (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 Denizen Text Formatting. |
| Example | |
| Group | text manipulation |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L517 |
| Name | <ElementTag.on_click[<command>]> |
| Returns | ElementTag |
| Description | Adds 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 (Chat Triggers), you can use the command "/denizenclickable chat SOME MESSAGE HERE" (requires players have permission "denizen.clickable") For that, instead prefer ElementTag.click_chat Note that this is a magic Denizen tool - refer to Denizen Text Formatting. |
| Example | |
| Example | |
| Group | text manipulation |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L532 |
| Name | <PlayerTag.groups[(<world>)]> |
| Returns | ListTag |
| Description | Returns a list of all groups the player is in.
May work with offline players, depending on permission plugin. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1092 |
| Name | <PlayerTag.in_group[<group_name>].global> |
| Returns | ElementTag(Boolean) |
| Description | Returns 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.) |
| Source | https://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>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns 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.) |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1280 |
| Name | <PlayerTag.in_group[<group_name>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the player is in the specified group.
(May work with offline players, depending on your permissions system.) |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1247 |
| Name | <PluginTag.commands> |
| Returns | MapTag(MapTag) |
| Description | Gets 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PluginTag.java#L213 |
| Name | If |
| Related Guide Page | https://guide.denizenscript.com/guides/basics/if-command.html |
| Syntax | if [<value>] (!)(<operator> <value>) (&&/|| ...) [<commands>] |
| Short Description | Compares values, and runs a subset of commands if they match. |
| Full Description | Compares 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 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 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | queue |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/IfCommand.java#L28 |