Double check to prevent /f upgrades items showing up when disabled
This commit is contained in:
parent
5fe55afc68
commit
640871d696
@ -37,23 +37,30 @@ public class FUpgradesGUI implements Listener {
|
||||
inventory.setItem(dummySlots.get(i), dummyItem);
|
||||
}
|
||||
ItemStack[] items = buildItems(fme);
|
||||
|
||||
List<Integer> cropSlots = P.p.getConfig().getIntegerList("fupgrades.MainMenu.Crops.CropItem.slots");
|
||||
List<Integer> spawnerSlots = P.p.getConfig().getIntegerList("fupgrades.MainMenu.Spawners.SpawnerItem.slots");
|
||||
List<Integer> expSlots = P.p.getConfig().getIntegerList("fupgrades.MainMenu.EXP.EXPItem.slots");
|
||||
List<Integer> chestSlots = P.p.getConfig().getIntegerList("fupgrades.MainMenu.Chest.ChestItem.slots");
|
||||
if (cropSlots != -1) {
|
||||
for (int i = 0; i <= cropSlots.size() - 1; i++) {
|
||||
inventory.setItem(cropSlots.get(i), items[2]);
|
||||
}
|
||||
List<Integer> spawnerSlots = P.p.getConfig().getIntegerList("fupgrades.MainMenu.Spawners.SpawnerItem.slots");
|
||||
}
|
||||
if (spawnerSlots != -1) {
|
||||
for (int i = 0; i <= spawnerSlots.size() - 1; i++) {
|
||||
inventory.setItem(spawnerSlots.get(i), items[1]);
|
||||
}
|
||||
List<Integer> expSlots = P.p.getConfig().getIntegerList("fupgrades.MainMenu.EXP.EXPItem.slots");
|
||||
}
|
||||
if (expSlots != -1) {
|
||||
for (int i = 0; i <= expSlots.size() - 1; i++) {
|
||||
inventory.setItem(expSlots.get(i), items[0]);
|
||||
}
|
||||
List<Integer> chestSlots = P.p.getConfig().getIntegerList("fupgrades.MainMenu.Chest.ChestItem.slots");
|
||||
}
|
||||
if (chestSlots != -1) {
|
||||
for (int i = 0; i <= chestSlots.size() - 1; i++) {
|
||||
inventory.setItem(chestSlots.get(i), items[3]);
|
||||
}
|
||||
}
|
||||
fme.getPlayer().openInventory(inventory);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user