From b29dd6458133dcbce83b3ae930c5196fdc1351eb Mon Sep 17 00:00:00 2001 From: DroppingAnvil Date: Mon, 16 Sep 2019 13:45:41 -0500 Subject: [PATCH] Removed my old conversion code for 1.14 since transitioned to XMaterial. XMaterial support added for EXP upgrade --- src/main/java/com/massivecraft/factions/FactionsPlugin.java | 6 ------ .../massivecraft/factions/zcore/fupgrades/FUpgradesGUI.java | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/FactionsPlugin.java b/src/main/java/com/massivecraft/factions/FactionsPlugin.java index 86b27fca..637a81b4 100755 --- a/src/main/java/com/massivecraft/factions/FactionsPlugin.java +++ b/src/main/java/com/massivecraft/factions/FactionsPlugin.java @@ -182,12 +182,6 @@ public class FactionsPlugin extends MPlugin { this.loadSuccessful = false; saveDefaultConfig(); - if (mc114) { - if (getConfig().getString("fupgrades.MainMenu.EXP.EXPItem.Type").equals("EXP_BOTTLE")) getConfig().set("fupgrades.MainMenu.EXP.EXPItem.Type", "EXPERIENCE_BOTTLE"); - if (getConfig().getString("fupgrades.MainMenu.Spawners.SpawnerItem.Type").equals("MOB_SPAWNER")) getConfig().set("fupgrades.MainMenu.Spawners.SpawnerItem.Type", "SPAWNER"); - if (getConfig().getString("fupgrades.MainMenu.DamageReduct.ReduceItem.Type").equals("GOLD_CHESTPLATE")) getConfig().set("fupgrades.MainMenu.DamageReduct.ReduceItem.Type", "GOLDEN_CHESTPLATE"); - if (getConfig().getString("fupgrades.MainMenu.Warps.WarpItem.Type").equals("EYE_OF_ENDER")) getConfig().set("fupgrades.MainMenu.Warps.WarpItem.Type", "ENDER_EYE"); - } // Load Conf from disk Conf.load(); diff --git a/src/main/java/com/massivecraft/factions/zcore/fupgrades/FUpgradesGUI.java b/src/main/java/com/massivecraft/factions/zcore/fupgrades/FUpgradesGUI.java index 7a2ed263..ec68a21a 100644 --- a/src/main/java/com/massivecraft/factions/zcore/fupgrades/FUpgradesGUI.java +++ b/src/main/java/com/massivecraft/factions/zcore/fupgrades/FUpgradesGUI.java @@ -314,9 +314,9 @@ public class FUpgradesGUI implements Listener { @SuppressWarnings("Duplicates") private ItemStack[] buildItems(FPlayer fme) { - Material expMaterial = Material.getMaterial(FactionsPlugin.getInstance().getConfig().getString("fupgrades.MainMenu.EXP.EXPItem.Type")); + byte expData = (byte) (FactionsPlugin.getInstance().getConfig().getInt("fupgrades.MainMenu.EXP.EXPItem.Damage")); + Material expMaterial = XMaterial.parseMaterial(FactionsPlugin.getInstance().getConfig().getString("fupgrades.MainMenu.EXP.EXPItem.Type"), expData); int expAmt = FactionsPlugin.getInstance().getConfig().getInt("fupgrades.MainMenu.EXP.EXPItem.Amount"); - short expData = Short.parseShort(FactionsPlugin.getInstance().getConfig().getInt("fupgrades.MainMenu.EXP.EXPItem.Damage") + ""); String expName = FactionsPlugin.getInstance().color(FactionsPlugin.getInstance().getConfig().getString("fupgrades.MainMenu.EXP.EXPItem.Name")); List expLore = FactionsPlugin.getInstance().colorList(FactionsPlugin.getInstance().getConfig().getStringList("fupgrades.MainMenu.EXP.EXPItem.Lore")); int expLevel = fme.getFaction().getUpgrade(UpgradeType.EXP);