manage_inventory
Is an action that allows you to save, open and delete the different inventories to the players.
Last updated
Is an action that allows you to save, open and delete the different inventories to the players.
Last updated
Allows you to save, open and delete the different inventories to the players (you can save and delete any inventories, but open only suitable of them for players).
- 'manage_inventory: action:<action>;<option>:<value>;<optionN>:<valueN>'
action:<action> โ may be save, open or delete, you can add "?" symbol before the action to use the temporary inventories storage, that is, until server restart; (MANDATORY)
inventory:<inventory_id> โ indicates by which id/name the inventory will be used (can be skipped only in case of "open" action); (SEMI-MANDATORY)
fake:<true | false> โ whether to open the fake inventory or not in cases of anvil, workbench and so on inventories (use only in case of "open" action, can be skipped); (SEMI-OPTIONAL)
owner:<entity_uuid | player_name | world,x,y,z> โ indicates which inventory will be used (for example of some player), if specified, all other properties will be ignored, you also can use "^" before the nickname to use the open player's inventory (use only in case of "save" or "open" actions, can be skipped); (SEMI-OPTIONAL)
holder:<entity_uuid | player_name | world,x,y,z> โ the holder which will hold the inventory (use only in case of "save" or "open" actions, can be skipped); (SEMI-OPTIONAL)
target:<player> โ for which player the inventory will be opened (use only in case of "open" action); (SEMI-MANDATORY)
typeOrSize:<inventory_type | integer_size> โ the type or the size of the inventory, see the available types , in case of size it should be a multiple of 9 between 9 and 54 slots, for example, 18 (use only in case of "save" or "open" actions); (SEMI-MANDATORY)
title:<inventory_title> โ the title of the inventory (use only in case of "open" action, can be skipped). (SEMI-OPTIONAL)
The perpetual inventories and temporary inventories are different! The same inventories names will point to different inventories.
You can not create the "CREATIVE" inventory type. You can specify the <owner> option and saving or opening inventories of this owner, without necessity to specify the inventory options like <holder>, <typeOrSize> and <title>. You can save and open any block inventories but only of them will be saving their contents. Not all mobs inventories are suitable for opening to the players due to their incompatible size. You can specify or <inventory> option to open/resave/delete the saved inventory, or <owner> option to open/save the someone's inventory, or <holder>, <typeOrSize> and <title> options to create and open/save the new inventory depends on these values.
If "?" prefix will not be specified in the action, the inventory will be stored in a file at the path plugins/TriggerReactor/inventories.json (you can change this file, changes will take effect after the command /trg reload confirm), otherwise the inventory will be stored in the server memory until it is restarted.
For example, if you need to create the custom system of "virtual personal storages", it also can be combined in a useful way with action for "expandable storages" etc.
- 'manage_inventory: action:open;target:%player%;holder:%player%;typeOrSize:CHEST;title:ยงfMy little inventory' # Open the new inventory to the current player with type "CHEST", title "ยงfMy little inventory" and holder as the current player
- 'manage_inventory: action:save;owner:^%player%;title:ยงaSaved Enderchest' # Save the open inventory (for example, enderchest) of the current player with custom title