#(gageg23) Item to open menu

12 messages · Page 1 of 1 (latest)

hollow haven
#

Is it possible to have an item in your hotbar that you click to open a gui?

magic joltBOT
#

(gageg23) Item to open menu

magic joltBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

wintry bear
#

Yes

#

Click while holding the item or click the actual item while having your inventory open?

hollow haven
#

While holding the item then right clicking

wintry bear
#

!e clicks block

rose ingotBOT
# wintry bear !e clicks block
Group

Player

**WARNING**

this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions.

Event Lines

player (right|left) clicks <block>

Switches

with:<item> to only process the event if a specified item was held.
using:hand/off_hand/either_hand to only process the event if the specified hand was used to click.
type:<material> to only run if the block clicked matches the material input.

Triggers

when a player clicks on a block or in the air.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.item> returns the ItemTag the player is clicking with.
<context.location> returns the LocationTag the player is clicking on.
<context.relative> returns a LocationTag of the air block in front of the clicked block.
<context.click_type> returns an ElementTag of the Spigot API click type <@link url https://hub.spi...
<context.hand> returns an ElementTag of the used hand.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

wintry bear
#

Switches with:<item> to only process the event if a specified item was held.

#
on player right clicks block with:my_item:
...```
hollow haven
#

/resovled