#(space.slayer) Inventory GUI
14 messages · Page 1 of 1 (latest)
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.
depends on how you want to do something
if you meant by clicking them:
!event clicks in inventory
Player
player (<click_type>) clicks (<item>) in <inventory>
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.
when a player clicks in an inventory. Note that you likely will also want to listen to !event player drags in inventory.
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<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.
ItemTag to set the current item for the event.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
so like player right clicks x with:y:
it opens a 27 slot inventory and selects 6 of those slots and puts a certain item in them, else other slots gets another item
Gets a random item in the list and returns it.
Optionally, add [<#>] to instead get a list of multiple randomly chosen list entries.
ObjectTag
# Narrates EITHER "one" OR "two" - different each time!
- narrate "<list[one|two].random>
# Could narrate "one|two", "two|three", OR "one|three" - different each time!
- narrate "<list[one|two|three].random[2]>
# Could narrate "one|two|three", "one|three|two", "two|one|three", "two|three|one", "three|two|one", OR "three|one|two" - different each time!
- narrate "<list[one|two|three].random[9999]>
Thread closed as resolved.
Thread was manually reopened by @strong oak.