diff --git a/src/main/java/com/iridium/iridiumskyblock/configs/Biomes.java b/src/main/java/com/iridium/iridiumskyblock/configs/Biomes.java index 6a10a2266..877225a5f 100644 --- a/src/main/java/com/iridium/iridiumskyblock/configs/Biomes.java +++ b/src/main/java/com/iridium/iridiumskyblock/configs/Biomes.java @@ -20,7 +20,7 @@ public class Biomes { public Map categories = ImmutableMap.builder() .put("Overworld", new BiomeCategoryConfig(new Item(XMaterial.GRASS_BLOCK, 11, 1, "&9&lOverworld", Collections.emptyList()), 6)) - .put("Nether", new BiomeCategoryConfig(new Item(XMaterial.CRIMSON_HYPHAE, 13, 1, "&9&lNether", Collections.emptyList()), 6)) + .put("Nether", new BiomeCategoryConfig(new Item(XMaterial.NETHERRACK, 13, 1, "&9&lNether", Collections.emptyList()), 6)) .put("End", new BiomeCategoryConfig(new Item(XMaterial.END_STONE, 15, 1, "&9&lEnd", Collections.emptyList()), 6)) .build(); diff --git a/src/main/java/com/iridium/iridiumskyblock/gui/BiomeCategoryGUI.java b/src/main/java/com/iridium/iridiumskyblock/gui/BiomeCategoryGUI.java index dec559288..64c757e0b 100644 --- a/src/main/java/com/iridium/iridiumskyblock/gui/BiomeCategoryGUI.java +++ b/src/main/java/com/iridium/iridiumskyblock/gui/BiomeCategoryGUI.java @@ -19,7 +19,7 @@ import java.util.Optional; /** - * GUI which shows all items in a {@link BiomeCategory} and allows players to purchase them. + * GUI which shows all biomes in a {@link BiomeCategory} and allows players to purchase them. */ public class BiomeCategoryGUI extends GUI { @@ -28,7 +28,7 @@ public class BiomeCategoryGUI extends GUI { /** * The default constructor. * - * @param category The category whose items should be displayed in this GUI + * @param category The category whose biomes should be displayed in this GUI */ public BiomeCategoryGUI(BiomeCategory category, Inventory previousInventory) { super(previousInventory); @@ -44,7 +44,7 @@ public BiomeCategoryGUI(BiomeCategory category, Inventory previousInventory) { @Override public Inventory getInventory() { Inventory inventory = Bukkit.createInventory(this, category.size, StringUtils.color(IridiumSkyblock.getInstance().getBiomes().categoryTitle - .replace("%category_name%", category.name) + .replace("%biomecategory_name%", category.name) )); Bukkit.getScheduler().runTaskAsynchronously(IridiumSkyblock.getInstance(), () -> addContent(inventory)); @@ -61,20 +61,20 @@ public void addContent(Inventory inventory) { InventoryUtils.fillInventory(inventory, IridiumSkyblock.getInstance().getBiomes().categoryBackground); - for (BiomeItem item : category.items) { - ItemStack itemStack = item.item.parseItem(); + for (BiomeItem biomeItem : category.items) { + ItemStack itemStack = biomeItem.item.parseItem(); ItemMeta itemMeta = itemStack.getItemMeta(); - itemStack.setAmount(item.defaultAmount); - itemMeta.setDisplayName(StringUtils.color(item.name)); + itemStack.setAmount(biomeItem.defaultAmount); + itemMeta.setDisplayName(StringUtils.color(biomeItem.name)); - List lore = item.lore == null ? new ArrayList<>() : new ArrayList<>(StringUtils.color(item.lore)); - addBiomeLore(lore, item); + List lore = biomeItem.lore == null ? new ArrayList<>() : new ArrayList<>(StringUtils.color(biomeItem.lore)); + addBiomeLore(lore, biomeItem); itemMeta.setLore(lore); itemStack.setItemMeta(itemMeta); - inventory.setItem(item.slot, itemStack); + inventory.setItem(biomeItem.slot, itemStack); } if (IridiumSkyblock.getInstance().getConfiguration().backButtons && getPreviousInventory() != null) { @@ -107,13 +107,13 @@ public void onInventoryClick(InventoryClickEvent event) { } } - private void addBiomeLore(List lore, BiomeItem item) { - if (item.isPurchasable()) { + private void addBiomeLore(List lore, BiomeItem biomeItem) { + if (biomeItem.isPurchasable()) { lore.add( StringUtils.color(IridiumSkyblock.getInstance().getBiomes().buyPriceLore - .replace("%amount%", String.valueOf(item.defaultAmount)) - .replace("%buy_price_vault%", formatPrice(item.buyCost.vault)) - .replace("%buy_price_crystals%", formatPrice(item.buyCost.crystals)) + .replace("%amount%", String.valueOf(biomeItem.defaultAmount)) + .replace("%buy_price_vault%", formatPrice(biomeItem.buyCost.vault)) + .replace("%buy_price_crystals%", formatPrice(biomeItem.buyCost.crystals)) ) ); } else { @@ -121,10 +121,7 @@ private void addBiomeLore(List lore, BiomeItem item) { } IridiumSkyblock.getInstance().getBiomes().biomeItemLore.stream() - .map(StringUtils::color) - .forEach(line -> lore.add( - line.replace("%amount%", String.valueOf(item.defaultAmount)) - )); + .map(StringUtils::color); } private String formatPrice(double value) {