-
Notifications
You must be signed in to change notification settings - Fork 15
Activator INVENTORY_CLICK
MaxDikiy edited this page Nov 1, 2017
·
4 revisions
This activator works when the player performs actions with the inventory using the mouse or keys
/react add INVENTORY_CLICK <ActivatorId> [click:
<ClickType>
] [action:
<InventoryAction>
] [inventory:
<InventoryType>
] [slotType:
<SlotType>
] [key:1..9/ANY] [item:
<Item>
] [slot:0..35/ANY]
Element | Possible values | Description |
---|---|---|
name |
`` | The Inventory name. |
click |
ANY, CONTROL_DROP, CREATIVE, DOUBLE_CLICK, DROP, LEFT, MIDDLE, NUMBER_KEY, RIGHT, SHIFT_LEFT, SHIFT_RIGHT, UNKNOWN, WINDOW_BORDER_LEFT, WINDOW_BORDER_RIGHT |
The type of click that triggered the activator. By default click:ANY - triggered by any action. |
action |
ANY, CLONE_STACK, COLLECT_TO_CURSOR, DROP_ALL_CURSOR, DROP_ALL_SLOT, DROP_ONE_CURSOR, DROP_ONE_SLOT, HOTBAR_MOVE_AND_READD, HOTBAR_SWAP, MOVE_TO_OTHER_INVENTORY, NOTHING, PICKUP_ALL, PICKUP_HALF, PICKUP_ONE, PICKUP_SOME, PLACE_ALL, PLACE_ONE, PLACE_SOME, SWAP_WITH_CURSOR, UNKNOWN |
The type of action that triggered the activator. By default action:ANY - triggered by any action in the inventory. |
inventory |
ANY, ANVIL, BEACON, BREWING, CHEST, CRAFTING, CREATIVE, DISPENSER, DROPPER, ENCHANTING, ENDER_CHEST, HOPPER, MERCHANT, PLAYER, SHULKER_BOX, WORKBENCH |
The inventory type. Default inventory:ANY - triggered by any inventory type |
slotType |
ANY, ARMOR, CONTAINER, CRAFTING, FUEL, OUTSIDE, QUICKBAR, RESULT |
The slot type. Default slotType:ANY - triggered by any slot type |
key |
ANY, 1..9 |
The number key corresponding to the slot in the bottom toolbar. Default key:ANY . |
slot |
ANY, 0..35 |
The number slot. Default slot:ANY . |
Placeholder | Description |
---|---|
%name% |
Shows, at what Inventory name |
%click% |
Shows, at what action of the player the activator has worked |
%action% |
Shows the action of the player in the inventory |
%inventory% |
Shows the type of inventory that the player uses. |
%slotType% |
Shows the slotType used by the player. |
%item% |
Displays the item in the slot that the player clicked on. |
%key% |
Shows the key that the player pressed: 1..9 . If % key% = 0 , then the key is not pressed. |
%itemkey% |
Displays the item corresponding to the player's button pressed in the lower inventory. |
%slot% |
Shows the slot that the player clicked: 0..35 . |
- We will display all the events that occur during actions in the inventory:
/react add inventory_click ic_event
/react add ic_event a message "&aclick: &r%click%"
/react add ic_event a message "&baction: &r%action%"
/react add ic_event a message "&cinventory: &r%inventory%"
/react add ic_event a message "&dslot: &r%slot%"
or
INVENTORY_CLICK:
ic_event:
click-type: ANY
action-type: ANY
inventory-type: ANY
slot-type: ANY
item: ''
key: ANY
slot: ANY
actions:
- 'message=&aclick: &r%click%'
- 'message=&baction: &r%action%'
- 'message=&cinventory: &r%inventory%'
- 'message=&dslot-type: &r%slotType%'
- 'message=&6item: &r%item%'
- 'message=&6key: &r%key%'
- 'message=&6itemkey: &r%itemkey%'
- 'message=&6slot: &r%slot%'
- We forbid to craft a chest.
/react add inventory_click chest slot:result item:{type:chest}
/react add chest a cancel_event true
or
INVENTORY_CLICK:
chest:
click-type: ANY
action-type: ANY
slot-type: RESULT
item: type:chest
actions:
- cancel_event=true
- We prohibit moving the golden block from/into the chest
/react add inventory_click chest_deny inventory:chest item:{type:GOLD_BLOCK}
/react add chest_deny a cancel_event true
or
INVENTORY_CLICK:
chest_deny:
click-type: ANY
action-type: ANY
inventory-type: CHEST
slot-type: ANY
item: type:GOLD_BLOCK
actions:
- cancel_event=true
Links:
Download | Support | Twitter | VK | MinecraftMain Blog
© 2017, fromgate
http://reactions.fromgate.me
http://reactions.fromgate.ru
- Commands and Permission
- Activators
- Flags
- Actions
- Timers
- Menus
- Data formats
- Configuration
- Команды и пермишены
- Активаторы
- Флаги
- Действия
- Таймеры
- Меню
- Форматы данных
- Конфигурация