Removed my old conversion code for 1.14 since transitioned to XMaterial. XMaterial support added for EXP upgrade

This commit is contained in:
DroppingAnvil 2019-09-16 13:45:41 -05:00
parent bc00a5ebd7
commit b29dd64581
2 changed files with 2 additions and 8 deletions

View File

@ -182,12 +182,6 @@ public class FactionsPlugin extends MPlugin {
this.loadSuccessful = false; this.loadSuccessful = false;
saveDefaultConfig(); 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 // Load Conf from disk
Conf.load(); Conf.load();

View File

@ -314,9 +314,9 @@ public class FUpgradesGUI implements Listener {
@SuppressWarnings("Duplicates") @SuppressWarnings("Duplicates")
private ItemStack[] buildItems(FPlayer fme) { 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"); 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")); String expName = FactionsPlugin.getInstance().color(FactionsPlugin.getInstance().getConfig().getString("fupgrades.MainMenu.EXP.EXPItem.Name"));
List<String> expLore = FactionsPlugin.getInstance().colorList(FactionsPlugin.getInstance().getConfig().getStringList("fupgrades.MainMenu.EXP.EXPItem.Lore")); List<String> expLore = FactionsPlugin.getInstance().colorList(FactionsPlugin.getInstance().getConfig().getStringList("fupgrades.MainMenu.EXP.EXPItem.Lore"));
int expLevel = fme.getFaction().getUpgrade(UpgradeType.EXP); int expLevel = fme.getFaction().getUpgrade(UpgradeType.EXP);