How does it work?
This section for example in storage1
will be a storage type, so when you create a block with storage and put storage1
it will have all these settings in the storage you created.
Configuration file loc: /plugins/StorageMechanic/storages/
Option | Usage | default value |
---|---|---|
max_views | This adjusts the maximum number of players that can be viewing the storage at the same time. if it is -1 the system is not activated | -1 |
Type | Usage | Slots |
---|---|---|
chest | Chest type inventory | **size: 54 slots** |
dropper | Dropper type inventory | size: 9 slots |
hopper | Hopper type inventory | size: 5 slots |
dispenser | Dispenser type inventory | size: 9 slots |
Propertie | Usage | required |
---|---|---|
isTempStorage | recommended for use actions only no storage persistent | No |
dropAllItemsOnClose | recommended for use actions only no storage persistent | No |
Be careful how many pages you use could affect performance.
I have tried an inventory with 1000 pages without problem but be careful especially if you use mysql
storages:
storage1: #Storage ID
config:
max_views: -1
storage:
rows: 6
pages: 10 #Pages that the storage will have
inventory_type: chest #dropper, hopper, dispenser
title: "Storage (%actual_page%/%max_pages%)" #Menu Title
properties:
isTempStorage: false # for use actions only no storage persistent
dropAllItemsOnClose: false # for use actions only no storage persistent
Type | Usage |
---|---|
close | on close page |
open | on open page |
click | on click slot |
.
sounds:
enabled: true
list:
sound_1:
type: close #Sound when closing the storage
pages: [0,1]
sound: 'minecraft:block.barrel.close'
sound_2:
type: open #Sound when opening the storage
pages: [0,1]
sound: 'minecraft:block.barrel.open'
sound_3:
type: click #Sound when click the storage
pages: [0,1]
slots: [0]
sound: 'minecraft:sound'
The first time you open a new Storage of this type, the items you choose will be placed inside and can be obtained.
.
items:
default:
enabled: true
list:
item_1:
pages: [0,1] #Slots in which they will be
slots: [0]
amount: 10-40 #amount that may appear
chance: 40 #% in which it will appear
items:
- "mc:stone"
Used to lock items slots without item interface
.
block:
enabled: true
list:
block1:
pages: [ 0,1 ]
slots: [ 0,1 ]
message: "test"
Items can be placed in Storage
.
whitelist:
enabled: false
message: "It is not in the white list!"
list:
items_1:
pages: [0,1] #Only on this page of the Storage this configuration will be valid.
slots: [0-20] #Slots in which they will be
items:
- 'mc:diamond'
- 'mc:emerald'
Items that may not be place inside the Storage
.
blacklist:
enabled: true
message: "It is on the blacklist!"
list:
items_test:
pages: [1] #Only on this page of the Storage this configuration will be valid.
slots: [0-53] #Slots in which they will be
items:
- 'mc:emerald'
These are the items that will be the default items in the interface, these are configured in ItemInterface
.
interfaces:
enabled: true
list:
iterface1:
pages: [0,2,4,6,8] #pages on which they will be
slots: [0-9,44-53,17,26,35,36,27,18] #Slots in which they will be
item: item1 #item1 in iteminterface.yml
iterface2:
pages: [1,3,5,7,9]
slots: [0-9,44-53,17,26,35,36,27,18] #Slots in which they will be
item: item2 #item2 in iteminterface.yml
iterface3:
pages: [0-8]
slots: [52]
item: item3 #item3 in iteminterface.yml
iterface4:
pages: [1-9] #pages on which they will be
slots: [51]
item: item4 #item4 in iteminterface.yml
iterface5:
pages: [1-9] #pages on which they will be
slots: [50]
item: item5 #item5 in iteminterface.yml
Stages are used to give status to the inventory either to change the title every second or to change the content of the item interfaces.
.
stages:
refresh: 0
list:
stage_1:
title: "<red>Stage 1"
interfaces:
list:
item_action:
pages: [0-2]
slots: [22]
item: itemAction
next_page:
pages: [0-1]
slots: [53]
item: item3 #item3 in iteminterface.yml
back_page:
pages: [1-2] #pages on which they will be
slots: [52]
item: item4 #item4 in iteminterface.yml
search_page:
pages: [0-2] #pages on which they will be
slots: [46]
item: item5 #item5 in iteminterface.yml
placeholder:
pages: [0] #pages on which they will be
slots: [0-8]
item: itemPlaceHolder #item5 in iteminterface.yml
clear_inventory:
pages: [0-2] #pages on which they will be
slots: [47]
item: itemCleaner #item5 in iteminterface.yml
search_item:
pages: [0-2] #pages on which they will be
slots: [45]
item: itemSearch #item5 in iteminterface.yml
storages:
storage1: #Storage ID
config:
max_views: -1
storage:
rows: 6
pages: 10 #Pages that the storage will have
inventory_type: chest #dropper, hopper, dispenser
title: "Storage (%actual_page%/%max_pages%)" #Menu Title
sounds:
enabled: true
list:
sound_1:
type: close #Sound when closing the storage
pages: [0,1]
sound: 'minecraft:block.barrel.close'
sound_2:
type: open #Sound when opening the storage
pages: [0,1]
sound: 'minecraft:block.barrel.open'
sound_3:
type: click #Sound when click the storage
pages: [0,1]
slots: [0]
sound: 'minecraft:sound'
items:
default:
enabled: true
list:
item_1:
pages: [0,1] #Slots in which they will be
slots: [0]
amount: 10-40 #amount that may appear
chance: 40 #% in which it will appear
items:
- "mc:stone"
block:
enabled: true
list:
block1:
pages: [ 0,1 ]
slots: [ 0,1 ]
message: "test"
whitelist:
enabled: false
message: "It is not in the white list!"
list:
items_1:
pages: [0,1] #Only on this page of the Storage this configuration will be valid.
slots: [0-20] #Slots in which they will be
items:
- 'mc:diamond'
- 'mc:emerald'
blacklist:
enabled: true
message: "It is on the blacklist!"
list:
items_test:
pages: [1] #Only on this page of the Storage this configuration will be valid.
slots: [0-53] #Slots in which they will be
items:
- 'mc:emerald'
interfaces:
enabled: true
list:
iterface1:
pages: [0,2,4,6,8] #pages on which they will be
slots: [0-9,44-53,17,26,35,36,27,18] #Slots in which they will be
item: item1 #item1 in iteminterface.yml
iterface2:
pages: [1,3,5,7,9]
slots: [0-9,44-53,17,26,35,36,27,18] #Slots in which they will be
item: item2 #item2 in iteminterface.yml
iterface3:
pages: [0-8]
slots: [52]
item: item3 #item3 in iteminterface.yml
iterface4:
pages: [1-9] #pages on which they will be
slots: [51]
item: item4 #item4 in iteminterface.yml
iterface5:
pages: [1-9] #pages on which they will be
slots: [50]
item: item5 #item5 in iteminterface.yml
stages:
refresh: 0
list:
stage_1:
title: "<red>Stage 1"
interfaces:
list:
item_action:
pages: [0-2]
slots: [22]
item: itemAction
next_page:
pages: [0-1]
slots: [53]
item: item3 #item3 in iteminterface.yml
back_page:
pages: [1-2] #pages on which they will be
slots: [52]
item: item4 #item4 in iteminterface.yml
search_page:
pages: [0-2] #pages on which they will be
slots: [46]
item: item5 #item5 in iteminterface.yml
placeholder:
pages: [0] #pages on which they will be
slots: [0-8]
item: itemPlaceHolder #item5 in iteminterface.yml
clear_inventory:
pages: [0-2] #pages on which they will be
slots: [47]
item: itemCleaner #item5 in iteminterface.yml
search_item:
pages: [0-2] #pages on which they will be
slots: [45]
item: itemSearch #item5 in iteminterface.yml