Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Config overhaul part 6

  • Loading branch information...
commit 05724ae64f0bc61b2c386276a7bea7ee12e8f8e9 1 parent 8d7afe4
@nossr50 nossr50 authored
View
4 src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java
@@ -46,8 +46,8 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
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") }));
View
31 src/main/java/com/gmail/nossr50/config/Config.java
@@ -76,7 +76,7 @@ public static String getMySQLUserPassword() {
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 static String getMySQLUserPassword() {
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 static String getMySQLUserPassword() {
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 @@ protected void loadKeys() {
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 @@ protected void loadKeys() {
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 @@ protected void loadKeys() {
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 @@ protected void loadKeys() {
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);
}
}
View
4 src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java
@@ -299,11 +299,11 @@ public void onEntityTame(EntityTameEvent event) {
switch (type) {
case WOLF:
- xp = Config.mtameWolf;
+ xp = Config.getTamingXPWolf();
break;
case OCELOT:
- xp = Config.mtameOcelot;
+ xp = Config.getTamingXPOcelot();
break;
default:
View
4 src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java
@@ -235,7 +235,7 @@ public void onPlayerInteract(PlayerInteractEvent event) {
}
/* 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 void onPlayerInteract(PlayerInteractEvent event) {
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);
}
View
4 src/main/java/com/gmail/nossr50/skills/Taming.java
@@ -214,12 +214,12 @@ public static void animalSummon(EntityType type, Player player, mcMMO plugin) {
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:
View
20 src/main/java/com/gmail/nossr50/skills/WoodCutting.java
@@ -53,7 +53,7 @@ public static void treeFeller(BlockBreakEvent event) {
* @param PP The PlayerProfile of the player
*/
private static void removeBlocks(ArrayList<Block> 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 @@ private static void removeBlocks(ArrayList<Block> toBeFelled, Player player, Pla
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 @@ private static boolean treeFellerCompatible(Block block) {
private static void processTreeFelling(Block currentBlock, ArrayList<Block> toBeFelled) {
Material type = currentBlock.getType();
- if(toBeFelled.size() >= Config.treeFellerThreshold) {
+ if(toBeFelled.size() >= Config.getTreeFellerThreshold()) {
return;
}
@@ -281,19 +281,19 @@ public static void woodcuttingBlockCheck(Player player, Block block) {
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:
Please sign in to comment.
Something went wrong with that request. Please try again.