diff --git a/src/me/mrCookieSlime/Slimefun/api/item_transport/CargoManager.java b/src/me/mrCookieSlime/Slimefun/api/item_transport/CargoManager.java index 5bca98cc3..0a21f4b63 100644 --- a/src/me/mrCookieSlime/Slimefun/api/item_transport/CargoManager.java +++ b/src/me/mrCookieSlime/Slimefun/api/item_transport/CargoManager.java @@ -3,6 +3,7 @@ package me.mrCookieSlime.Slimefun.api.item_transport; import java.util.ArrayList; import java.util.List; +import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config; import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.Item.CustomItem; import me.mrCookieSlime.Slimefun.Setup.SlimefunManager; import me.mrCookieSlime.Slimefun.Setup.SlimefunManager.DataType; @@ -194,11 +195,13 @@ public class CargoManager { String id = BlockStorage.checkID(block); if (id.equals("CARGO_NODE_OUTPUT")) return true; + Config blockInfo = BlockStorage.getBlockInfo(block); // Store the returned Config instance to avoid heavy calls + BlockMenu menu = BlockStorage.getInventory(block.getLocation()); - boolean lore = BlockStorage.getBlockInfo(block, "filter-lore").equals("true"); - boolean data = BlockStorage.getBlockInfo(block, "filter-durability").equals("true"); + boolean lore = blockInfo.getString("filter-lore").equals("true"); + boolean data = blockInfo.getString("filter-durability").equals("true"); - if (BlockStorage.getBlockInfo(block, "filter-type").equals("whitelist")) { + if (blockInfo.getString("filter-type").equals("whitelist")) { List items = new ArrayList(); for (int slot: slots) { ItemStack template = menu.getItemInSlot(slot);