#(Bill Gates) can i prevent an item from being disenchanted at a grindstone?

1 messages · Page 1 of 1 (latest)

jovial meteor
#

i didn't find any relevant tags or events

covert pulsarBOT
#

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.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

elfin bronze
#

!event clicks in inventory

jolly pecanBOT
# elfin bronze !event clicks in inventory
Group

Player

Event Lines

player (<click_type>) clicks (<item>) in <inventory>

Switches

with:<item> to only process the event if a specified cursor item was used.
in_area:<area> replaces the default 'in:<area>' for this event.
action:<action> to only process the event if a specified action occurred.
slot:<slot> to only process the event if a specified slot or slot_type was clicked. For slot input options, see !language Slot Inputs.

Triggers

when a player clicks in an inventory. Note that you likely will also want to listen to !event player drags in inventory.

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 has clicked on.
<context.inventory> returns the InventoryTag (the 'top' inventory, regardless of which slot was clicked).
<context.clicked_inventory> returns the InventoryTag that was clicked in.
<context.cursor_item> returns the item the Player is clicking with.
<context.click> returns an ElementTag with the name of the click type. Click type list: <@link url...
<context.slot_type> returns an ElementTag with the name of the slot type that was clicked. Slot ty...
<context.slot> returns an ElementTag with the number of the slot that was clicked.
<context.raw_slot> returns an ElementTag with the raw number of the slot that was clicked.
<context.is_shift_click> returns true if 'shift' was used while clicking.
<context.action> returns the inventory_action. See <@link language Inventory Actions>.
... and 1 more.

Determine

ItemTag to set the current item for the event.

Has Known Location

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

Cancellable

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

elfin bronze
#

oh actually, i read your last message and misunderstood the last part of your message

#

you'll need to save the enchantment before it's crafted and then apply it

jovial meteor
#

but apply when? as far as i've seen, there's no event for grindstone

elfin bronze
#

there's not, the clicks in inventory will fire however and you can make a replacement there

jovial meteor
#

hmm, so, noting for future me:
i have to check if it's x item being put at x slot, and then if it isn't taken away and there's a click on the other slot, cancel and close the inventory or something similar

#

or i could just close the inventory when that item gets put anywhere in the grindstone

#

yeah that seems alright, i'll do it tomorrow bc i have to go sleepy rn

jovial meteor
#

worked! ez, thanks