right click out of 3928 meta-documentation entries...| Name | player right clicks entity |
| Event Lines | player right clicks <entity> |
| Triggers | when a player right clicks on an entity. |
| Generated Examples | after player right clicks entity:
on player right clicks monster: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | with:<item> to only process the event when the player is holding a specified item.
type:<entity> to only run if the entity clicked matches the entity input. |
| Contexts | <context.entity> returns the EntityTag the player is clicking on.
<context.item> returns the ItemTag the player is clicking with.
<context.hand> returns "offhand" or "mainhand" to indicate which hand was used to fire the event. Some events fire twice - once for each hand.
<context.click_position> returns a LocationTag of the click position (as a world-less vector, relative to the entity's center). This is only available when clicking armor stands.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Warning(s) | this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerRightClicksEntityScriptEvent.java#L21 |
| 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 | Click Triggers |
| Description | Click Triggers are triggered when a player right clicks the NPC.
These are very basic with no extraneous complexity.
They can optionally have an item matcher with multiple triggers, for the item in the player's hand. For example: |
| Group | NPC Interact Scripts |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/triggers/core/ClickTrigger.java#L25 |
| Name | TradeTag |
| Prefix | trade@ |
| Base Type | ElementTag |
| Implements | PropertyHolderObject |
| Identity Format | The identity format for trades is just the text 'trade'. All other data is specified through properties. |
| Description | Merchant trades are the parts of a special merchant inventory that is typically viewed by right clicking
a villager entity. Any number of trades can fit in a single merchant inventory. Trades are represented by TradeTags. The properties that can be used to customize a merchant trade are: result=<item> inputs=<item>(|<item>) uses=<number of uses> max_uses=<maximum number of uses> has_xp=true/false For example, the following command opens a virtual merchant inventory with two merchant trades. The first trade offers a sponge for two emeralds, can be used up to 10 times, and offers XP upon a successful transaction. The second trade has zero maximum uses and displays a barrier in the input and output slots. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/TradeTag.java#L17 |
| Name | <EntityTag.last_interaction> |
| Returns | MapTag |
| Description | Returns an interaction entity's last right click interaction, if any.
The returned map contains: - 'player' (PlayerTag): the player who interacted - 'duration' (DurationTag): the amount of time since the interaction. Note that this is a delta time (same limitations as delta time), and may become inaccurate if the interaction entity changes worlds. - 'raw_game_time' (ElementTag(Number)): the raw game time the interaction occurred at, used to calculate the time above. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L2953 |