Skip to content

Commit fc18552

Browse files
committed
Improve inventory_click docs
1 parent ab3a1a0 commit fc18552

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

src/main/java/com/laytonsmith/core/events/drivers/InventoryEvents.java

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,23 +70,28 @@ public String getName() {
7070

7171
@Override
7272
public String docs() {
73-
return "{virtual: <boolean match> Whether or not this inventory is virtually stored in CH"
74-
+ " | slottype: <macro> The type of slot being clicked, can be "
75-
+ StringUtils.Join(MCSlotType.values(), ", ", ", or ")
76-
+ " | clicktype: <macro> One of " + StringUtils.Join(MCClickType.values(), ", ", ", or ")
77-
+ " | action: <macro> One of " + StringUtils.Join(MCInventoryAction.values(), ", ", ", or ")
78-
+ " | slotitem: <string match> | player: <macro>}"
79-
+ " Fired when a player clicks a slot in any inventory. "
80-
+ " {player: The player who clicked | viewers: everyone looking in this inventory"
81-
+ " | leftclick: if this was a left click | keyboardclick: true/false if a key was pressed"
82-
+ " | rightclick: if this was a right click | shiftclick: true/false if shift was being held"
83-
+ " | creativeclick: true/false if this action could only be performed in creative mode"
84-
+ " | slot: the slot number | rawslot: the slot number in whole inventory window | slottype"
85-
+ " | slotitem | inventorytype | inventorysize: number of slots in opened inventory | cursoritem"
86-
+ " | inventory: all the items in the (top) inventory | clicktype | action"
87-
+ " | hotbarbutton: the hotbar slot (0-8) corresponding to the number key pressed, or -1 if none.}"
88-
+ " {slotitem: the item currently in the clicked slot | cursoritem: the item on the cursor"
89-
+ " (may cause unexpected behavior)}"
73+
return "{virtual: <boolean match> If the inventory is virtually held in CH"
74+
+ " | slottype: <macro> " + StringUtils.Join(MCSlotType.values(), ", ", ", or ")
75+
+ " | clicktype: <macro> " + StringUtils.Join(MCClickType.values(), ", ", ", or ")
76+
+ " | action: <macro> " + StringUtils.Join(MCInventoryAction.values(), ", ", ", or ")
77+
+ " | slotitem: <string match> The item type | player: <macro>}"
78+
+ " Fired when a player interacts with any inventory GUI. See also inventory_drag."
79+
+ " {slottype: The type of slot being clicked | clicktype: The type of input"
80+
+ " | action: The resulting action | slotitem: The item in the clicked slot"
81+
+ " | player: The player who clicked | viewers: Every player looking at this inventory"
82+
+ " | leftclick: If left mouse click | rightclick: If right mouse click"
83+
+ " | keyboardclick: If key press | shiftclick: If shift held"
84+
+ " | creativeclick: If action could only be performed in creative mode, like clone stack."
85+
+ " | slot: The slot number clicked. Will be -999 if the click occurred outside the window."
86+
+ " | rawslot: The slot number clicked in the whole inventory window. This will be higher than"
87+
+ " inventorysize if the click did not occur in the open inventory."
88+
+ " | inventorytype: The type of open inventory (if self-inventory, this will be CRAFTING)"
89+
+ " | inventorysize: Number of slots in the open inventory"
90+
+ " | cursoritem: The item on the cursor"
91+
+ " | inventory: An array of all the items in the open inventory"
92+
+ " | hotbarbutton: The hotbar slot (0-8) if a number key was pressed, or -1 none.}"
93+
+ " {slotitem: The item to put in the clicked slot"
94+
+ " | cursoritem: The item to put on the cursor}"
9095
+ " {}";
9196
}
9297

0 commit comments

Comments
 (0)