diff --git a/src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java index 9246157ef..16bc4c0fd 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java @@ -46,8 +46,8 @@ public class TamingCommand implements CommandExecutor { player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Taming.Effect.10"), mcLocale.getString("Taming.Effect.11") })); player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Taming.Effect.12"), mcLocale.getString("Taming.Effect.13") })); player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Taming.Effect.16"), mcLocale.getString("Taming.Effect.17") })); - player.sendMessage(mcLocale.getString("Taming.Effect.14", new Object[] { Config.fishConsumedByCOTW })); - player.sendMessage(mcLocale.getString("Taming.Effect.15", new Object[] { Config.bonesConsumedByCOTW })); + player.sendMessage(mcLocale.getString("Taming.Effect.14", new Object[] { Config.getTamingCOTWOcelotCost() })); + player.sendMessage(mcLocale.getString("Taming.Effect.15", new Object[] { Config.getTamingCOTWWolfCost() })); player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Commands.Stats.Self") })); diff --git a/src/main/java/com/gmail/nossr50/config/Config.java b/src/main/java/com/gmail/nossr50/config/Config.java index acac5acdd..302899c26 100644 --- a/src/main/java/com/gmail/nossr50/config/Config.java +++ b/src/main/java/com/gmail/nossr50/config/Config.java @@ -76,7 +76,7 @@ public class Config extends ConfigLoader{ serratedStrikeCooldown, skullSplitterCooldown; /* Thresholds */ - public static int treeFellerThreshold; + public static int getTreeFellerThreshold() { return config.getInt("Abilities.Limits.Tree_Feller_Threshold", 500); } /* * SKILL SETTINGS @@ -128,7 +128,7 @@ public class Config extends ConfigLoader{ public static int getMiningXPEndStone() { return config.getInt("Experience.Mining.End_Stone", 150); } public static int getMiningXPMossyStone() { return config.getInt("Experience.Mining.Moss_Stone", 30); } - public static int detonatorID; + public static int getDetonatorItemID() { return config.getInt("Skills.Mining.Detonator_ID", 259); } /* Repair */ public static Boolean repairArmor, repairTools; @@ -138,11 +138,16 @@ public class Config extends ConfigLoader{ public static int repairStoneLevel, repairIronLevel, repairGoldLevel, repairDiamondLevel, repairStringLevel; /* Taming */ - public static int mtameWolf, mtameOcelot; - public static int bonesConsumedByCOTW, fishConsumedByCOTW; + public static int getTamingXPWolf() { return config.getInt("Experience.Taming.Animal_Taming.Wolf", 250); } + public static int getTamingXPOcelot() { return config.getInt("Experience.Taming.Animal_Taming.Ocelot", 500); } + public static int getTamingCOTWWolfCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10); } + public static int getTamingCOTWOcelotCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Fish_Required", 10); } /* Woodcutting */ - public static int moak, mbirch, mspruce, mjungle; + public static int getWoodcuttingXPOak() { return config.getInt("Experience.Woodcutting.Oak", 70); } + public static int getWoodcuttingXPBirch() { return config.getInt("Experience.Woodcutting.Birch", 90); } + public static int getWoodcuttingXPSpruce() { return config.getInt("Experience.Woodcutting.Spruce", 80); } + public static int getWoodcuttingXPJungle() { return config.getInt("Experience.Woodcutting.Jungle", 100); } /* Arcane Forging */ public static Boolean mayDowngradeEnchants, mayLoseEnchants; @@ -306,10 +311,7 @@ public class Config extends ConfigLoader{ donateMessage = config.getBoolean("Commands.mcmmo.Donate_Message", true); xpGainsMobSpawners = config.getBoolean("Experience.Gains.Mobspawners.Enabled", false); - - bonesConsumedByCOTW = config.getInt("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10); - fishConsumedByCOTW = config.getInt("Skills.Taming.Call_Of_The_Wild.Fish_Required", 10); - + xpbar = config.getBoolean("Spout.XP.Bar.Enabled", true); xpicon = config.getBoolean("Spout.XP.Icon.Enabled", true); xpbar_x = config.getInt("Spout.XP.Bar.X_POS", 95); @@ -321,15 +323,9 @@ public class Config extends ConfigLoader{ showDisplayName = config.getBoolean("Spout.Party.HUD.Show_Display_Name", false); partybar = config.getBoolean("Spout.Party.HUD.Enabled", true); - moak = config.getInt("Experience.Woodcutting.Oak", 70); - mbirch = config.getInt("Experience.Woodcutting.Birch", 90); - mspruce = config.getInt("Experience.Woodcutting.Spruce", 80); - mjungle = config.getInt("Experience.Woodcutting.Jungle", 100); - - mtameWolf = config.getInt("Experience.Taming.Animal_Taming.Wolf", 250); - mtameOcelot = config.getInt("Experience.Taming.Animal_Taming.Ocelot", 500); + @@ -338,7 +334,6 @@ public class Config extends ConfigLoader{ greenTerraCooldown = config.getInt("Abilities.Cooldowns.Green_Terra", 240); superBreakerCooldown = config.getInt("Abilities.Cooldowns.Super_Breaker", 240); gigaDrillBreakerCooldown = config.getInt("Abilities.Cooldowns.Giga_Drill_Breaker", 240); - treeFellerThreshold = config.getInt("Abilities.Limits.Tree_Feller_Threshold", 500); treeFellerCooldown = config.getInt("Abilities.Cooldowns.Tree_Feller", 240); berserkCooldown = config.getInt("Abilities.Cooldowns.Berserk", 240); serratedStrikeCooldown = config.getInt("Abilities.Cooldowns.Serrated_Strikes", 240); @@ -403,7 +398,5 @@ public class Config extends ConfigLoader{ arcaneRank4 = config.getInt("Arcane_Forging.Rank_Levels.Rank_4", 750); ptpCommandCooldown = config.getInt("Commands.ptp.Cooldown", 30); - - detonatorID = config.getInt("Skills.Mining.Detonator_ID", 259); } } \ No newline at end of file diff --git a/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java b/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java index a1275439d..50cfeb1e3 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java @@ -299,11 +299,11 @@ public class mcEntityListener implements Listener { switch (type) { case WOLF: - xp = Config.mtameWolf; + xp = Config.getTamingXPWolf(); break; case OCELOT: - xp = Config.mtameOcelot; + xp = Config.getTamingXPOcelot(); break; default: diff --git a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java index 6f66d05a8..9970038f7 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java @@ -235,7 +235,7 @@ public class mcPlayerListener implements Listener { } /* BLAST MINING CHECK */ - if (mcPermissions.getInstance().blastMining(player) && is.getTypeId() == Config.detonatorID) { + if (mcPermissions.getInstance().blastMining(player) && is.getTypeId() == Config.getDetonatorItemID()) { BlastMining.remoteDetonation(player, plugin); } @@ -258,7 +258,7 @@ public class mcPlayerListener implements Listener { Item.itemchecks(player); /* BLAST MINING CHECK */ - if (mcPermissions.getInstance().blastMining(player) && is.getTypeId() == Config.detonatorID) { + if (mcPermissions.getInstance().blastMining(player) && is.getTypeId() == Config.getDetonatorItemID()) { BlastMining.remoteDetonation(player, plugin); } diff --git a/src/main/java/com/gmail/nossr50/skills/Taming.java b/src/main/java/com/gmail/nossr50/skills/Taming.java index 1675018a2..76b9b1620 100644 --- a/src/main/java/com/gmail/nossr50/skills/Taming.java +++ b/src/main/java/com/gmail/nossr50/skills/Taming.java @@ -214,12 +214,12 @@ public class Taming { switch (type) { case WOLF: summonItem = Material.BONE; - summonAmount = Config.bonesConsumedByCOTW; + summonAmount = Config.getTamingCOTWWolfCost(); break; case OCELOT: summonItem = Material.RAW_FISH; - summonAmount = Config.fishConsumedByCOTW; + summonAmount = Config.getTamingCOTWOcelotCost(); break; default: diff --git a/src/main/java/com/gmail/nossr50/skills/WoodCutting.java b/src/main/java/com/gmail/nossr50/skills/WoodCutting.java index 75f7a3554..156ef0f82 100644 --- a/src/main/java/com/gmail/nossr50/skills/WoodCutting.java +++ b/src/main/java/com/gmail/nossr50/skills/WoodCutting.java @@ -53,7 +53,7 @@ public class WoodCutting { * @param PP The PlayerProfile of the player */ private static void removeBlocks(ArrayList toBeFelled, Player player, PlayerProfile PP) { - if (toBeFelled.size() >= Config.treeFellerThreshold) { + if (toBeFelled.size() >= Config.getTreeFellerThreshold()) { player.sendMessage(mcLocale.getString("Woodcutting.Skills.TreeFellerThreshold")); return; } @@ -116,19 +116,19 @@ public class WoodCutting { switch (species) { case GENERIC: - xp += Config.moak; + xp += Config.getWoodcuttingXPOak(); break; case REDWOOD: - xp += Config.mspruce; + xp += Config.getWoodcuttingXPSpruce(); break; case BIRCH: - xp += Config.mbirch; + xp += Config.getWoodcuttingXPBirch(); break; case JUNGLE: - xp += Config.mjungle / 4; //Nerf XP from Jungle Trees when using Tree Feller + xp += Config.getWoodcuttingXPJungle() / 4; //Nerf XP from Jungle Trees when using Tree Feller break; default: @@ -187,7 +187,7 @@ public class WoodCutting { private static void processTreeFelling(Block currentBlock, ArrayList toBeFelled) { Material type = currentBlock.getType(); - if(toBeFelled.size() >= Config.treeFellerThreshold) { + if(toBeFelled.size() >= Config.getTreeFellerThreshold()) { return; } @@ -281,19 +281,19 @@ public class WoodCutting { switch (species) { case GENERIC: - xp += Config.moak; + xp += Config.getWoodcuttingXPOak(); break; case REDWOOD: - xp += Config.mspruce; + xp += Config.getWoodcuttingXPSpruce(); break; case BIRCH: - xp += Config.mbirch; + xp += Config.getWoodcuttingXPBirch(); break; case JUNGLE: - xp += Config.mjungle; + xp += Config.getWoodcuttingXPJungle(); break; default: