mirror of
https://github.com/JamesPeters98/ChestsPlusPlus.git
synced 2025-01-25 17:51:36 +01:00
Update LinkedChest.java
When upgrading from previous versions chests.yml doesnt contain the mapping for autocraftingtables. This adds a check for null for both chests and crafting tables.
This commit is contained in:
parent
01229a2907
commit
d44a417a50
@ -22,7 +22,9 @@ public class LinkedChest implements ConfigurationSerializable {
|
||||
@SuppressWarnings("unchecked")
|
||||
public LinkedChest(Map<String, Object> map){
|
||||
chests = (HashMap<String, HashMap<String, InventoryStorage>>) map.get("chests");
|
||||
if(chests == null) chests = new HashMap<>();
|
||||
autocraftingtables = (HashMap<String, HashMap<String, AutoCraftingStorage>>) map.get("autocraftingtables");
|
||||
if(autocraftingtables == null) autocraftingtables = new HashMap<>();
|
||||
validate();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user