Config overhaul is DONE!

This commit is contained in:
nossr50 2012-04-26 11:53:21 -07:00
parent 295b7a0701
commit 2729b37b76
18 changed files with 136 additions and 180 deletions

View File

@ -87,7 +87,7 @@ public class BlockChecks {
break; break;
} }
if (Material.getMaterial(Config.anvilID).equals(material)) { if (Material.getMaterial(Config.getRepairAnvilId()).equals(material)) {
return false; return false;
} }
else { else {

View File

@ -247,7 +247,7 @@ public class Combat {
* @param cause DamageCause to pass to damage event * @param cause DamageCause to pass to damage event
*/ */
private static void dealDamage(LivingEntity target, int dmg, DamageCause cause) { private static void dealDamage(LivingEntity target, int dmg, DamageCause cause) {
if (Config.eventCallback) { if (Config.getEventCallbackEnabled()) {
EntityDamageEvent ede = (EntityDamageEvent) new FakeEntityDamageEvent(target, cause, dmg); EntityDamageEvent ede = (EntityDamageEvent) new FakeEntityDamageEvent(target, cause, dmg);
mcMMO.p.getServer().getPluginManager().callEvent(ede); mcMMO.p.getServer().getPluginManager().callEvent(ede);
@ -270,7 +270,7 @@ public class Combat {
* @param attacker Player to pass to event as damager * @param attacker Player to pass to event as damager
*/ */
private static void dealDamage(LivingEntity target, int dmg, Player attacker) { private static void dealDamage(LivingEntity target, int dmg, Player attacker) {
if (Config.eventCallback) { if (Config.getEventCallbackEnabled()) {
EntityDamageEvent ede = (EntityDamageByEntityEvent) new FakeEntityDamageByEntityEvent(attacker, target, EntityDamageEvent.DamageCause.ENTITY_ATTACK, dmg); EntityDamageEvent ede = (EntityDamageByEntityEvent) new FakeEntityDamageByEntityEvent(attacker, target, EntityDamageEvent.DamageCause.ENTITY_ATTACK, dmg);
mcMMO.p.getServer().getPluginManager().callEvent(ede); mcMMO.p.getServer().getPluginManager().callEvent(ede);
@ -395,7 +395,7 @@ public class Combat {
double baseXP = 0; double baseXP = 0;
if (target instanceof Player) { if (target instanceof Player) {
if (!Config.pvpxp) { if (!Config.getExperienceGainsPlayerVersusPlayerEnabled()) {
return; return;
} }

View File

@ -18,7 +18,7 @@ public class McmmoCommand implements CommandExecutor {
String[] mcSplit = description.split(","); String[] mcSplit = description.split(",");
sender.sendMessage(mcSplit); sender.sendMessage(mcSplit);
if (Config.donateMessage) { if (Config.getDonateMessageEnabled()) {
if (Config.spoutEnabled && sender instanceof SpoutPlayer) { if (Config.spoutEnabled && sender instanceof SpoutPlayer) {
SpoutPlayer sPlayer = (SpoutPlayer) sender; SpoutPlayer sPlayer = (SpoutPlayer) sender;

View File

@ -44,8 +44,8 @@ public class PtpCommand implements CommandExecutor {
return true; return true;
} }
if (PP.getRecentlyHurt() + (Config.ptpCommandCooldown * 1000) > System.currentTimeMillis()) { if (PP.getRecentlyHurt() + (Config.getPTPCommandCooldown() * 1000) > System.currentTimeMillis()) {
player.sendMessage(mcLocale.getString("Party.Teleport.Hurt", new Object[] { Config.ptpCommandCooldown })); player.sendMessage(mcLocale.getString("Party.Teleport.Hurt", new Object[] { Config.getPTPCommandCooldown() }));
return true; return true;
} }

View File

@ -45,7 +45,7 @@ public class RepairCommand implements CommandExecutor {
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Repair.Effect.0"), mcLocale.getString("Repair.Effect.1") })); player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Repair.Effect.0"), mcLocale.getString("Repair.Effect.1") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Repair.Effect.2"), mcLocale.getString("Repair.Effect.3") })); player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Repair.Effect.2"), mcLocale.getString("Repair.Effect.3") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Repair.Effect.4"), mcLocale.getString("Repair.Effect.5") })); player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Repair.Effect.4"), mcLocale.getString("Repair.Effect.5") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Repair.Effect.6", new Object[] { Config.repairDiamondLevel }), mcLocale.getString("Repair.Effect.7") })); player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Repair.Effect.6", new Object[] { Config.getRepairDiamondLevelRequirement() }), mcLocale.getString("Repair.Effect.7") }));
player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Repair.Effect.8"), mcLocale.getString("Repair.Effect.9") })); player.sendMessage(mcLocale.getString("Effects.Template", new Object[] { mcLocale.getString("Repair.Effect.8"), mcLocale.getString("Repair.Effect.9") }));
player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Commands.Stats.Self") })); player.sendMessage(mcLocale.getString("Skills.Header", new Object[] { mcLocale.getString("Commands.Stats.Self") }));

View File

@ -32,7 +32,7 @@ public class MchudCommand implements CommandExecutor {
return true; return true;
} }
if (!Config.spoutEnabled || !Config.xpbar) { if (!Config.spoutEnabled || !Config.getSpoutXPBarEnabled()) {
sender.sendMessage(mcLocale.getString("Commands.Disabled")); sender.sendMessage(mcLocale.getString("Commands.Disabled"));
return true; return true;
} }

View File

@ -26,7 +26,7 @@ public class XplockCommand implements CommandExecutor {
return true; return true;
} }
if (!Config.spoutEnabled || !Config.xpbar || !Config.getCommandXPLockEnabled()) { if (!Config.spoutEnabled || !Config.getSpoutXPBarEnabled() || !Config.getCommandXPLockEnabled()) {
sender.sendMessage(mcLocale.getString("Commands.Disabled")); sender.sendMessage(mcLocale.getString("Commands.Disabled"));
return true; return true;
} }

View File

@ -4,15 +4,19 @@ import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.datatypes.HUDType; import com.gmail.nossr50.datatypes.HUDType;
public class Config extends ConfigLoader{ public class Config extends ConfigLoader{
public static int xpGainMultiplier = getExperienceGainsGlobalMultiplier();
/* /*
* GENERAL SETTINGS * GENERAL SETTINGS
*/ */
/* General Settings */ /* General Settings */
public static String locale; public static String getLocale() { return config.getString("General.Locale", "en_us"); }
public static Boolean enableMotd, statsTracking, eventCallback; public static boolean getMOTDEnabled() { return config.getBoolean("General.MOTD_Enabled", true); }
public static int saveInterval; public static int getSaveInterval() { return config.getInt("General.Save_Interval", 10); }
public static boolean getStatsTrackingEnabled() { return config.getBoolean("General.Stats_Tracking", true); }
public static boolean getEventCallbackEnabled() { return config.getBoolean("General.Event_Callback", true); }
/* mySQL */ /* mySQL */
public static boolean getUseMySQL() { return config.getBoolean("MySQL.Enabled", false); } public static boolean getUseMySQL() { return config.getBoolean("MySQL.Enabled", false); }
@ -52,8 +56,8 @@ public class Config extends ConfigLoader{
public static boolean getCommandAdminChatAEnabled() { return config.getBoolean("Commands.a.Enabled", true); } public static boolean getCommandAdminChatAEnabled() { return config.getBoolean("Commands.a.Enabled", true); }
public static boolean getCommandPartyChatPEnabled() { return config.getBoolean("Commands.p.Enabled", true); } public static boolean getCommandPartyChatPEnabled() { return config.getBoolean("Commands.p.Enabled", true); }
public static int ptpCommandCooldown; public static int getPTPCommandCooldown() { return config.getInt("Commands.ptp.Cooldown", 30); }
public static Boolean donateMessage; public static boolean getDonateMessageEnabled() { return config.getBoolean("Commands.mcmmo.Donate_Message", true); }
/* Items */ /* Items */
public static int getChimaeraCost() { return config.getInt("Items.Chimaera_Wing.Feather_Cost", 10); } public static int getChimaeraCost() { return config.getInt("Items.Chimaera_Wing.Feather_Cost", 10); }
@ -120,8 +124,9 @@ public class Config extends ConfigLoader{
public static int getHerbalismXPVines() { return config.getInt("Experience.Herbalism.Vines", 10); } public static int getHerbalismXPVines() { return config.getInt("Experience.Herbalism.Vines", 10); }
public static boolean getHerbalismHungerBonusEnabled() { return config.getBoolean("Skills.Herbalism.Hunger_Bonus", true); } public static boolean getHerbalismHungerBonusEnabled() { return config.getBoolean("Skills.Herbalism.Hunger_Bonus", true); }
public static boolean getHerbalismWheatRegrowth() { return config.getBoolean("Skills.Herbalism.Instant_Wheat_Regrowth", true); } public static boolean getHerbalismWheatRegrowth() { return config.getBoolean("Skills.Herbalism.Instant_Wheat_Regrowth", true); }
public static boolean getHerbalismGreenThumbCobbleToMossy() { return config.getBoolean("Skills.Herbalism.Green_Thumb.Cobble_To_Mossy", true); }
public static Boolean enableCobbleToMossy, enableSmoothToMossy, enableDirtToGrass; public static boolean getHerbalismGreenThumbSmoothbrickToMossy() { return config.getBoolean("Skills.Herbalism.Green_Thumb.SmoothBrick_To_MossyBrick", true); }
public static boolean getHerbalismGreenThumbDirtToGrass() { return config.getBoolean("Skills.Herbalism.Green_Thumb.Dirt_To_Grass", true); }
/* Mining */ /* Mining */
public static int getMiningXPGoldOre() { return config.getInt("Experience.Mining.Gold", 250); } public static int getMiningXPGoldOre() { return config.getInt("Experience.Mining.Gold", 250); }
@ -141,11 +146,24 @@ public class Config extends ConfigLoader{
public static int getDetonatorItemID() { return config.getInt("Skills.Mining.Detonator_ID", 259); } public static int getDetonatorItemID() { return config.getInt("Skills.Mining.Detonator_ID", 259); }
/* Repair */ /* Repair */
public static Boolean repairArmor, repairTools; public static boolean getRepairAnvilMessagesEnabled() { return config.getBoolean("Skills.Repair.Anvil_Messages", true); }
public static Boolean anvilmessages; public static int getRepairAnvilId() { return config.getInt("Skills.Repair.Anvil_ID", 42); }
public static int rWood, rStone, rIron, rGold, rDiamond, rString, rLeather;
public static int anvilID; public static int getRepairGoldMaterial() { return config.getInt("Skills.Repair.Gold.ID", 266); }
public static int repairStoneLevel, repairIronLevel, repairGoldLevel, repairDiamondLevel, repairStringLevel; public static int getRepairStoneMaterial() { return config.getInt("Skills.Repair.Stone.ID", 4); }
public static int getRepairWoodMaterial() { return config.getInt("Skills.Repair.Wood.ID", 5); }
public static int getRepairDiamondMaterial() { return config.getInt("Skills.Repair.Diamond.ID", 264); }
public static int getRepairIronMaterial() { return config.getInt("Skills.Repair.Iron.ID", 265); }
public static int getRepairStringMaterial() { return config.getInt("Skills.Repair.String.ID", 287); }
public static int getRepairLeatherMaterial() { return config.getInt("Skills.Repair.Leather.ID", 334); }
public static boolean getRepairArmorAllowed() { return config.getBoolean("Skills.Repair.Can_Repair_Armor", true); }
public static boolean getRepairToolsAllowed() { return config.getBoolean("Skills.Repair.Can_Repair_Tools", true); }
public static int getRepairDiamondLevelRequirement() { return config.getInt("Skills.Repair.Diamond.Level_Required", 50); }
public static int getRepairIronLevelRequirement() { return config.getInt("Skills.Repair.Iron.Level_Required", 0); }
public static int getRepairGoldLevelRequirement() { return config.getInt("Skills.Repair.Gold.Level_Required", 0); }
public static int getRepairStoneLevelRequirement() { return config.getInt("Skills.Repair.Stone.Level_Required", 0); }
public static int getRepairStringLevelRequirement() { return config.getInt("Skills.Repair.String.Level_Required", 0); }
/* Taming */ /* Taming */
public static int getTamingXPWolf() { return config.getInt("Experience.Taming.Animal_Taming.Wolf", 250); } public static int getTamingXPWolf() { return config.getInt("Experience.Taming.Animal_Taming.Wolf", 250); }
@ -160,10 +178,20 @@ public class Config extends ConfigLoader{
public static int getWoodcuttingXPJungle() { return config.getInt("Experience.Woodcutting.Jungle", 100); } public static int getWoodcuttingXPJungle() { return config.getInt("Experience.Woodcutting.Jungle", 100); }
/* Arcane Forging */ /* Arcane Forging */
public static Boolean mayDowngradeEnchants, mayLoseEnchants; public static boolean getArcaneForgingDowngradeEnabled() { return config.getBoolean("Arcane_Forging.Downgrades.Enabled", true); }
public static int arcaneRank1, arcaneRank2, arcaneRank3, arcaneRank4; public static int getArcaneForgingDowngradeChanceRank1() { return config.getInt("Arcane_Forging.Downgrades.Chance.Rank_1", 75); }
public static int downgradeRank1, downgradeRank2, downgradeRank3, downgradeRank4; public static int getArcaneForgingDowngradeChanceRank2() { return config.getInt("Arcane_Forging.Downgrades.Chance.Rank_2", 50); }
public static int keepEnchantsRank1, keepEnchantsRank2, keepEnchantsRank3, keepEnchantsRank4; public static int getArcaneForgingDowngradeChanceRank3() { return config.getInt("Arcane_Forging.Downgrades.Chance.Rank_3", 25); }
public static int getArcaneForgingDowngradeChanceRank4() { return config.getInt("Arcane_Forging.Downgrades.Chance.Rank_4", 15); }
public static boolean getArcaneForgingEnchantLossEnabled() { return config.getBoolean("Arcane_Forging.May_Lose_Enchants", true); }
public static int getArcaneForgingKeepEnchantsChanceRank1() { return config.getInt("Arcane_Forging.Keep_Enchants.Chance.Rank_1", 10); }
public static int getArcaneForgingKeepEnchantsChanceRank2() { return config.getInt("Arcane_Forging.Keep_Enchants.Chance.Rank_2", 20); }
public static int getArcaneForgingKeepEnchantsChanceRank3() { return config.getInt("Arcane_Forging.Keep_Enchants.Chance.Rank_3", 30); }
public static int getArcaneForgingKeepEnchantsChanceRank4() { return config.getInt("Arcane_Forging.Keep_Enchants.Chance.Rank_4", 40); }
public static int getArcaneForgingRankLevels1() { return config.getInt("Arcane_Forging.Rank_Levels.Rank_1", 100); }
public static int getArcaneForgingRankLevels2() { return config.getInt("Arcane_Forging.Rank_Levels.Rank_2", 250); }
public static int getArcaneForgingRankLevels3() { return config.getInt("Arcane_Forging.Rank_Levels.Rank_3", 500); }
public static int getArcaneForgingRankLevels4() { return config.getInt("Arcane_Forging.Rank_Levels.Rank_4", 750); }
/* Level Caps */ /* Level Caps */
public static int getLevelCapAcrobatics() { return config.getInt("Skills.Acrobatics.Level_Cap", 0); } public static int getLevelCapAcrobatics() { return config.getInt("Skills.Acrobatics.Level_Cap", 0); }
@ -185,8 +213,9 @@ public class Config extends ConfigLoader{
*/ */
/* General Settings */ /* General Settings */
public static Boolean xpGainsMobSpawners, pvpxp; public static boolean getExperienceGainsMobspawnersEnabled() { return config.getBoolean("Experience.Gains.Mobspawners.Enabled", false); }
public static int xpGainMultiplier; public static boolean getExperienceGainsPlayerVersusPlayerEnabled() { return config.getBoolean("Experience.PVP.Rewards", true); }
public static int getExperienceGainsGlobalMultiplier() { return config.getInt("Experience.Gains.Multiplier.Global", 1); }
/* Combat XP Multipliers */ /* Combat XP Multipliers */
public static double getPlayerVersusPlayerXP() { return config.getDouble("Experience.Gains.Multiplier.PVP", 1.0); } public static double getPlayerVersusPlayerXP() { return config.getDouble("Experience.Gains.Multiplier.PVP", 1.0); }
@ -228,12 +257,13 @@ public class Config extends ConfigLoader{
public static boolean spoutEnabled; public static boolean spoutEnabled;
public static boolean getShowPowerLevelForSpout() { return config.getBoolean("Spout.HUD.Show_Power_Level", true); } public static boolean getShowPowerLevelForSpout() { return config.getBoolean("Spout.HUD.Show_Power_Level", true); }
/* Spout Party HUD */
public static Boolean showDisplayName, showFaces, partybar;
/* Spout XP Bar */ /* Spout XP Bar */
public static Boolean xpbar, xpicon; public static boolean getSpoutXPBarEnabled() { return config.getBoolean("Spout.XP.Bar.Enabled", true); }
public static int xpbar_x, xpbar_y, xpicon_x, xpicon_y; public static boolean getSpoutXPBarIconEnabled() { return config.getBoolean("Spout.XP.Icon.Enabled", true); }
public static int getSpoutXPBarXPosition() { return config.getInt("Spout.XP.Bar.X_POS", 95); }
public static int getSpoutXPBarYPosition() { return config.getInt("Spout.XP.Bar.Y_POS", 6); }
public static int getSpoutXPIconXPosition() { return config.getInt("Spout.XP.Icon.X_POS", 78); }
public static int getSpoutXPIconYPosition() { return config.getInt("Spout.XP.Icon.Y_POS", 2); }
/* Spout HUD Colors */ /* Spout HUD Colors */
public static double getSpoutRetroHUDXPBorderRed() { return config.getDouble("Spout.HUD.Retro.Colors.Border.RED", 0.0); } public static double getSpoutRetroHUDXPBorderRed() { return config.getDouble("Spout.HUD.Retro.Colors.Border.RED", 0.0); }
@ -316,71 +346,5 @@ public class Config extends ConfigLoader{
defaulthud = x; defaulthud = x;
} }
} }
donateMessage = config.getBoolean("Commands.mcmmo.Donate_Message", true);
xpGainsMobSpawners = config.getBoolean("Experience.Gains.Mobspawners.Enabled", false);
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);
xpbar_y = config.getInt("Spout.XP.Bar.Y_POS", 6);
xpicon_x = config.getInt("Spout.XP.Icon.X_POS", 78);
xpicon_y = config.getInt("Spout.XP.Icon.Y_POS", 2);
showFaces = config.getBoolean("Spout.Party.HUD.Show_Faces", true);
showDisplayName = config.getBoolean("Spout.Party.HUD.Show_Display_Name", false);
partybar = config.getBoolean("Spout.Party.HUD.Enabled", true);
locale = config.getString("General.Locale", "en_us");
enableMotd = config.getBoolean("General.MOTD_Enabled", true);
saveInterval = config.getInt("General.Save_Interval", 10);
statsTracking = config.getBoolean("General.Stats_Tracking", true);
eventCallback = config.getBoolean("General.Event_Callback", true);
enableCobbleToMossy = config.getBoolean("Skills.Herbalism.Green_Thumb.Cobble_To_Mossy", true);
enableSmoothToMossy = config.getBoolean("Skills.Herbalism.Green_Thumb.SmoothBrick_To_MossyBrick", true);
enableDirtToGrass = config.getBoolean("Skills.Herbalism.Green_Thumb.Dirt_To_Grass", true);
xpGainMultiplier = config.getInt("Experience.Gains.Multiplier.Global", 1);
pvpxp = config.getBoolean("Experience.PVP.Rewards", true);
repairArmor = config.getBoolean("Skills.Repair.Can_Repair_Armor", true);
repairTools = config.getBoolean("Skills.Repair.Can_Repair_Tools", true);
repairDiamondLevel = config.getInt("Skills.Repair.Diamond.Level_Required", 50);
repairIronLevel = config.getInt("Skills.Repair.Iron.Level_Required", 0);
repairGoldLevel = config.getInt("Skills.Repair.Gold.Level_Required", 0);
repairStoneLevel = config.getInt("Skills.Repair.Stone.Level_Required", 0);
repairStringLevel = config.getInt("Skills.Repair.String.Level_Required", 0);
anvilmessages = config.getBoolean("Skills.Repair.Anvil_Messages", true);
anvilID = config.getInt("Skills.Repair.Anvil_ID", 42);
rGold = config.getInt("Skills.Repair.Gold.ID", 266);
rStone = config.getInt("Skills.Repair.Stone.ID", 4);
rWood = config.getInt("Skills.Repair.Wood.ID", 5);
rDiamond = config.getInt("Skills.Repair.Diamond.ID", 264);
rIron = config.getInt("Skills.Repair.Iron.ID", 265);
rString = config.getInt("Skills.Repair.String.ID", 287);
rLeather = config.getInt("Skills.Repair.Leather.ID", 334);
mayDowngradeEnchants = config.getBoolean("Arcane_Forging.Downgrades.Enabled", true);
downgradeRank1 = config.getInt("Arcane_Forging.Downgrades.Chance.Rank_1", 75);
downgradeRank2 = config.getInt("Arcane_Forging.Downgrades.Chance.Rank_2", 50);
downgradeRank3 = config.getInt("Arcane_Forging.Downgrades.Chance.Rank_3", 25);
downgradeRank4 = config.getInt("Arcane_Forging.Downgrades.Chance.Rank_4", 15);
mayLoseEnchants = config.getBoolean("Arcane_Forging.May_Lose_Enchants", true);
keepEnchantsRank1 = config.getInt("Arcane_Forging.Keep_Enchants.Chance.Rank_1", 10);
keepEnchantsRank2 = config.getInt("Arcane_Forging.Keep_Enchants.Chance.Rank_2", 20);
keepEnchantsRank3 = config.getInt("Arcane_Forging.Keep_Enchants.Chance.Rank_3", 30);
keepEnchantsRank4 = config.getInt("Arcane_Forging.Keep_Enchants.Chance.Rank_4", 40);
arcaneRank1 = config.getInt("Arcane_Forging.Rank_Levels.Rank_1", 100);
arcaneRank2 = config.getInt("Arcane_Forging.Rank_Levels.Rank_2", 250);
arcaneRank3 = config.getInt("Arcane_Forging.Rank_Levels.Rank_3", 500);
arcaneRank4 = config.getInt("Arcane_Forging.Rank_Levels.Rank_4", 750);
ptpCommandCooldown = config.getInt("Commands.ptp.Cooldown", 30);
} }
} }

View File

@ -185,12 +185,12 @@ public class HUDmmo {
xpbg.setPriority(RenderPriority.Low); xpbg.setPriority(RenderPriority.Low);
xpbg.setDirty(true); xpbg.setDirty(true);
if (Config.xpbar) { if (Config.getSpoutXPBarEnabled()) {
sPlayer.getMainScreen().attachWidget(plugin, xpbar); sPlayer.getMainScreen().attachWidget(plugin, xpbar);
sPlayer.getMainScreen().attachWidget(plugin, xpfill); sPlayer.getMainScreen().attachWidget(plugin, xpfill);
sPlayer.getMainScreen().attachWidget(plugin, xpbg); sPlayer.getMainScreen().attachWidget(plugin, xpbg);
if (Config.xpicon) { if (Config.getSpoutXPBarIconEnabled()) {
sPlayer.getMainScreen().attachWidget(plugin, xpicon); sPlayer.getMainScreen().attachWidget(plugin, xpicon);
sPlayer.getMainScreen().attachWidget(plugin, xpicon_bg); sPlayer.getMainScreen().attachWidget(plugin, xpicon_bg);
sPlayer.getMainScreen().attachWidget(plugin, xpicon_border); sPlayer.getMainScreen().attachWidget(plugin, xpicon_border);
@ -206,26 +206,26 @@ public class HUDmmo {
* @param sPlayer Player to initialize XP bar for * @param sPlayer Player to initialize XP bar for
*/ */
public void initializeXpBarDisplayStandard(SpoutPlayer sPlayer) { public void initializeXpBarDisplayStandard(SpoutPlayer sPlayer) {
if (Config.xpbar) { if (Config.getSpoutXPBarEnabled()) {
xpbar = new GenericTexture(); xpbar = new GenericTexture();
((GenericTexture) xpbar).setUrl("xpbar_inc000.png"); ((GenericTexture) xpbar).setUrl("xpbar_inc000.png");
xpbar.setX(Config.xpbar_x); xpbar.setX(Config.getSpoutXPBarXPosition());
xpbar.setY(Config.xpbar_y); xpbar.setY(Config.getSpoutXPBarYPosition());
xpbar.setHeight(8); xpbar.setHeight(8);
xpbar.setWidth(256); xpbar.setWidth(256);
sPlayer.getMainScreen().attachWidget(plugin, xpbar); sPlayer.getMainScreen().attachWidget(plugin, xpbar);
if (Config.xpicon) { if (Config.getSpoutXPBarIconEnabled()) {
xpicon = new GenericTexture(); xpicon = new GenericTexture();
xpicon.setUrl("Icon.png"); xpicon.setUrl("Icon.png");
xpicon.setHeight(16); xpicon.setHeight(16);
xpicon.setWidth(32); xpicon.setWidth(32);
xpicon.setX(Config.xpicon_x); xpicon.setX(Config.getSpoutXPIconXPosition());
xpicon.setY(Config.xpicon_y); xpicon.setY(Config.getSpoutXPIconYPosition());
xpicon.setDirty(true); xpicon.setDirty(true);
sPlayer.getMainScreen().attachWidget(plugin, xpicon); sPlayer.getMainScreen().attachWidget(plugin, xpicon);
@ -241,25 +241,25 @@ public class HUDmmo {
* @param sPlayer Player to initialize XP bar for * @param sPlayer Player to initialize XP bar for
*/ */
private void initializeXpBarDisplaySmall(SpoutPlayer sPlayer) { private void initializeXpBarDisplaySmall(SpoutPlayer sPlayer) {
if (Config.xpbar) { if (Config.getSpoutXPBarEnabled()) {
xpbar = new GenericTexture(); xpbar = new GenericTexture();
((GenericTexture)xpbar).setUrl("xpbar_inc000.png"); ((GenericTexture)xpbar).setUrl("xpbar_inc000.png");
xpbar.setX(center_x - 64); xpbar.setX(center_x - 64);
xpbar.setY(Config.xpbar_y); xpbar.setY(Config.getSpoutXPBarYPosition());
xpbar.setHeight(4); xpbar.setHeight(4);
xpbar.setWidth(128); xpbar.setWidth(128);
sPlayer.getMainScreen().attachWidget(plugin, xpbar); sPlayer.getMainScreen().attachWidget(plugin, xpbar);
if (Config.xpicon) { if (Config.getSpoutXPBarIconEnabled()) {
xpicon = new GenericTexture(); xpicon = new GenericTexture();
xpicon.setUrl("Icon.png"); xpicon.setUrl("Icon.png");
xpicon.setHeight(8); xpicon.setHeight(8);
xpicon.setWidth(16); xpicon.setWidth(16);
xpicon.setX(center_x - (8 + 64)); xpicon.setX(center_x - (8 + 64));
xpicon.setY(Config.xpicon_y + 2); xpicon.setY(Config.getSpoutXPIconYPosition() + 2);
xpicon.setDirty(true); xpicon.setDirty(true);
sPlayer.getMainScreen().attachWidget(plugin, xpicon); sPlayer.getMainScreen().attachWidget(plugin, xpicon);
@ -276,7 +276,7 @@ public class HUDmmo {
* @param PP Profile of the given player * @param PP Profile of the given player
*/ */
private void updateXpBarStandard(Player player, PlayerProfile PP) { private void updateXpBarStandard(Player player, PlayerProfile PP) {
if (!Config.xpbar) { if (!Config.getSpoutXPBarEnabled()) {
return; return;
} }
@ -302,7 +302,7 @@ public class HUDmmo {
* @param PP Profile of the given player * @param PP Profile of the given player
*/ */
private void updateXpBarRetro(Player player, PlayerProfile PP) { private void updateXpBarRetro(Player player, PlayerProfile PP) {
if (!Config.xpbar) { if (!Config.getSpoutXPBarEnabled()) {
return; return;
} }

View File

@ -39,14 +39,6 @@ public class PopupMMO extends GenericPopup {
HUDButton.setY(center_y / 2); HUDButton.setY(center_y / 2);
HUDButton.setDirty(true); HUDButton.setDirty(true);
if (Config.partybar) {
PartyButton = new ButtonPartyToggle(PP);
PartyButton.setX(center_x - (PartyButton.getWidth() / 2));
PartyButton.setY((center_y / 2) + PartyButton.getHeight());
PartyButton.setDirty(true);
this.attachWidget(plugin, PartyButton);
}
EscapeButton = new ButtonEscape(); EscapeButton = new ButtonEscape();
EscapeButton.setX(center_x - (EscapeButton.getWidth() / 2)); EscapeButton.setX(center_x - (EscapeButton.getWidth() / 2));
EscapeButton.setY((center_y / 2) + (HUDButton.getHeight() * 2) + 5); EscapeButton.setY((center_y / 2) + (HUDButton.getHeight() * 2) + 5);

View File

@ -118,7 +118,7 @@ public class BlockListener implements Listener {
block.setMetadata("mcmmoPlacedBlock", new FixedMetadataValue(plugin, true)); block.setMetadata("mcmmoPlacedBlock", new FixedMetadataValue(plugin, true));
} }
if (id == Config.anvilID && Config.anvilmessages) { if (id == Config.getRepairAnvilId() && Config.getRepairAnvilMessagesEnabled()) {
Repair.placedAnvilCheck(player, id); Repair.placedAnvilCheck(player, id);
} }
} }

View File

@ -165,7 +165,7 @@ public class EntityListener implements Listener {
public void onCreatureSpawn(CreatureSpawnEvent event) { public void onCreatureSpawn(CreatureSpawnEvent event) {
SpawnReason reason = event.getSpawnReason(); SpawnReason reason = event.getSpawnReason();
if ((reason.equals(SpawnReason.SPAWNER) || reason.equals(SpawnReason.SPAWNER_EGG)) && !Config.xpGainsMobSpawners) { if ((reason.equals(SpawnReason.SPAWNER) || reason.equals(SpawnReason.SPAWNER_EGG)) && !Config.getExperienceGainsMobspawnersEnabled()) {
event.getEntity().setMetadata("mcmmoFromMobSpawner", new FixedMetadataValue(plugin, true)); event.getEntity().setMetadata("mcmmoFromMobSpawner", new FixedMetadataValue(plugin, true));
} }
} }

View File

@ -167,7 +167,7 @@ public class PlayerListener implements Listener {
public void onPlayerJoin(PlayerJoinEvent event) { public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer(); Player player = event.getPlayer();
if (mcPermissions.getInstance().motd(player) && Config.enableMotd) { if (mcPermissions.getInstance().motd(player) && Config.getMOTDEnabled()) {
player.sendMessage(mcLocale.getString("mcMMO.MOTD", new Object[] {plugin.getDescription().getVersion()})); player.sendMessage(mcLocale.getString("mcMMO.MOTD", new Object[] {plugin.getDescription().getVersion()}));
player.sendMessage(mcLocale.getString("mcMMO.Wiki")); player.sendMessage(mcLocale.getString("mcMMO.Wiki"));
} }
@ -204,7 +204,7 @@ public class PlayerListener implements Listener {
case RIGHT_CLICK_BLOCK: case RIGHT_CLICK_BLOCK:
/* REPAIR CHECKS */ /* REPAIR CHECKS */
if (mcPermissions.getInstance().repair(player) && block.getTypeId() == Config.anvilID && (ItemChecks.isTool(is) || ItemChecks.isArmor(is))) { if (mcPermissions.getInstance().repair(player) && block.getTypeId() == Config.getRepairAnvilId() && (ItemChecks.isTool(is) || ItemChecks.isArmor(is))) {
Repair.repairCheck(player, is); Repair.repairCheck(player, is);
event.setCancelled(true); event.setCancelled(true);
player.updateInventory(); player.updateInventory();

View File

@ -28,7 +28,7 @@ public class mcLocale {
try { try {
if (RESOURCE_BUNDLE == null) { if (RESOURCE_BUNDLE == null) {
Locale.setDefault(new Locale("en", "US")); Locale.setDefault(new Locale("en", "US"));
String[] myLocale = Config.locale.split("[-_ ]"); String[] myLocale = Config.getLocale().split("[-_ ]");
Locale locale = null; Locale locale = null;

View File

@ -134,7 +134,7 @@ public class mcMMO extends JavaPlugin {
//Schedule Spout Activation 1 second after start-up //Schedule Spout Activation 1 second after start-up
scheduler.scheduleSyncDelayedTask(this, new SpoutStart(this), 20); scheduler.scheduleSyncDelayedTask(this, new SpoutStart(this), 20);
//Periodic save timer (Saves every 10 minutes) //Periodic save timer (Saves every 10 minutes)
scheduler.scheduleSyncRepeatingTask(this, new mcSaveTimer(this), 0, Config.saveInterval * 1200); scheduler.scheduleSyncRepeatingTask(this, new mcSaveTimer(this), 0, Config.getSaveInterval() * 1200);
//Regen & Cooldown timer (Runs every second) //Regen & Cooldown timer (Runs every second)
scheduler.scheduleSyncRepeatingTask(this, new mcTimer(this), 0, 20); scheduler.scheduleSyncRepeatingTask(this, new mcTimer(this), 0, 20);
//Bleed timer (Runs every two seconds) //Bleed timer (Runs every two seconds)
@ -142,7 +142,7 @@ public class mcMMO extends JavaPlugin {
registerCommands(); registerCommands();
if (Config.statsTracking) { if (Config.getStatsTrackingEnabled()) {
//Plugin Metrics running in a new thread //Plugin Metrics running in a new thread
new Thread(new Runnable() { new Thread(new Runnable() {
public void run() { public void run() {

View File

@ -45,13 +45,13 @@ public class Herbalism {
player.updateInventory(); player.updateInventory();
if (m.blockBreakSimulate(block, player, false)) { if (m.blockBreakSimulate(block, player, false)) {
if (Config.enableSmoothToMossy && type.equals(Material.SMOOTH_BRICK)) { if (Config.getHerbalismGreenThumbSmoothbrickToMossy() && type.equals(Material.SMOOTH_BRICK)) {
block.setData((byte) 0x1); //Set type of the brick to mossy block.setData((byte) 0x1); //Set type of the brick to mossy
} }
else if (Config.enableDirtToGrass && type.equals(Material.DIRT)) { else if (Config.getHerbalismGreenThumbDirtToGrass() && type.equals(Material.DIRT)) {
block.setType(Material.GRASS); block.setType(Material.GRASS);
} }
else if (Config.enableCobbleToMossy && type.equals(Material.COBBLESTONE)) { else if (Config.getHerbalismGreenThumbCobbleToMossy() && type.equals(Material.COBBLESTONE)) {
block.setType(Material.MOSSY_COBBLESTONE); block.setType(Material.MOSSY_COBBLESTONE);
} }
} }

View File

@ -47,21 +47,21 @@ public class Repair {
/* /*
* REPAIR ARMOR * REPAIR ARMOR
*/ */
if (ItemChecks.isArmor(is) && Config.repairArmor && mcPermissions.getInstance().armorRepair(player)) { if (ItemChecks.isArmor(is) && Config.getRepairArmorAllowed() && mcPermissions.getInstance().armorRepair(player)) {
if (ItemChecks.isDiamondArmor(is) && inventory.contains(Config.rDiamond) && skillLevel >= Config.repairDiamondLevel && mcPermissions.getInstance().diamondRepair(player)) { if (ItemChecks.isDiamondArmor(is) && inventory.contains(Config.getRepairDiamondMaterial()) && skillLevel >= Config.getRepairDiamondLevelRequirement() && mcPermissions.getInstance().diamondRepair(player)) {
repairItem(player, is, new ItemStack(Config.rDiamond)); repairItem(player, is, new ItemStack(Config.getRepairDiamondMaterial()));
xpHandler(player, PP, is, durabilityBefore, 6, true); xpHandler(player, PP, is, durabilityBefore, 6, true);
} }
else if (ItemChecks.isIronArmor(is) && inventory.contains(Config.rIron) && skillLevel >= Config.repairIronLevel && mcPermissions.getInstance().ironRepair(player)) { else if (ItemChecks.isIronArmor(is) && inventory.contains(Config.getRepairIronMaterial()) && skillLevel >= Config.getRepairIronLevelRequirement() && mcPermissions.getInstance().ironRepair(player)) {
repairItem(player, is, new ItemStack(Config.rIron)); repairItem(player, is, new ItemStack(Config.getRepairIronMaterial()));
xpHandler(player, PP, is, durabilityBefore, 2, true); xpHandler(player, PP, is, durabilityBefore, 2, true);
} }
else if (ItemChecks.isGoldArmor(is) && inventory.contains(Config.rGold) && skillLevel >= Config.repairGoldLevel && mcPermissions.getInstance().goldRepair(player)) { else if (ItemChecks.isGoldArmor(is) && inventory.contains(Config.getRepairGoldMaterial()) && skillLevel >= Config.getRepairGoldLevelRequirement() && mcPermissions.getInstance().goldRepair(player)) {
repairItem(player, is, new ItemStack(Config.rGold)); repairItem(player, is, new ItemStack(Config.getRepairGoldMaterial()));
xpHandler(player, PP, is, durabilityBefore, 4, true); xpHandler(player, PP, is, durabilityBefore, 4, true);
} }
else if (ItemChecks.isLeatherArmor(is) && inventory.contains(Config.rLeather) && mcPermissions.getInstance().leatherRepair(player)) { else if (ItemChecks.isLeatherArmor(is) && inventory.contains(Config.getRepairLeatherMaterial()) && mcPermissions.getInstance().leatherRepair(player)) {
repairItem(player, is, new ItemStack(Config.rLeather)); repairItem(player, is, new ItemStack(Config.getRepairLeatherMaterial()));
xpHandler(player, PP, is, durabilityBefore, 1, true); xpHandler(player, PP, is, durabilityBefore, 1, true);
} }
else { else {
@ -72,29 +72,29 @@ public class Repair {
/* /*
* REPAIR TOOLS * REPAIR TOOLS
*/ */
else if (ItemChecks.isTool(is) && Config.repairTools && mcPermissions.getInstance().toolRepair(player)) { else if (ItemChecks.isTool(is) && Config.getRepairToolsAllowed() && mcPermissions.getInstance().toolRepair(player)) {
if (ItemChecks.isStoneTool(is) && inventory.contains(Config.rStone) && skillLevel >= Config.repairStoneLevel && mcPermissions.getInstance().stoneRepair(player)) { if (ItemChecks.isStoneTool(is) && inventory.contains(Config.getRepairStoneMaterial()) && skillLevel >= Config.getRepairStoneLevelRequirement() && mcPermissions.getInstance().stoneRepair(player)) {
repairItem(player, is, new ItemStack(Config.rStone)); repairItem(player, is, new ItemStack(Config.getRepairStoneMaterial()));
xpHandler(player, PP, is, durabilityBefore, 2, false); xpHandler(player, PP, is, durabilityBefore, 2, false);
} }
else if (ItemChecks.isWoodTool(is) && inventory.contains(Config.rWood) && mcPermissions.getInstance().woodRepair(player)) { else if (ItemChecks.isWoodTool(is) && inventory.contains(Config.getRepairWoodMaterial()) && mcPermissions.getInstance().woodRepair(player)) {
repairItem(player, is, new ItemStack(Config.rWood)); repairItem(player, is, new ItemStack(Config.getRepairWoodMaterial()));
xpHandler(player, PP, is, durabilityBefore, 2, false); xpHandler(player, PP, is, durabilityBefore, 2, false);
} }
else if (ItemChecks.isIronTool(is) && inventory.contains(Config.rIron) && skillLevel >= Config.repairIronLevel && mcPermissions.getInstance().ironRepair(player)) { else if (ItemChecks.isIronTool(is) && inventory.contains(Config.getRepairIronMaterial()) && skillLevel >= Config.getRepairIronLevelRequirement() && mcPermissions.getInstance().ironRepair(player)) {
repairItem(player, is, new ItemStack(Config.rIron)); repairItem(player, is, new ItemStack(Config.getRepairIronMaterial()));
xpHandler(player, PP, is, durabilityBefore, 1, true); xpHandler(player, PP, is, durabilityBefore, 1, true);
} }
else if (ItemChecks.isDiamondTool(is) && inventory.contains(Config.rDiamond) && skillLevel >= Config.repairDiamondLevel && mcPermissions.getInstance().diamondRepair(player)) { else if (ItemChecks.isDiamondTool(is) && inventory.contains(Config.getRepairDiamondMaterial()) && skillLevel >= Config.getRepairDiamondLevelRequirement() && mcPermissions.getInstance().diamondRepair(player)) {
repairItem(player, is, new ItemStack(Config.rDiamond)); repairItem(player, is, new ItemStack(Config.getRepairDiamondMaterial()));
xpHandler(player, PP, is, durabilityBefore, 1, true); xpHandler(player, PP, is, durabilityBefore, 1, true);
} }
else if (ItemChecks.isGoldTool(is) && inventory.contains(Config.rGold) && skillLevel >= Config.repairGoldLevel && mcPermissions.getInstance().goldRepair(player)) { else if (ItemChecks.isGoldTool(is) && inventory.contains(Config.getRepairGoldMaterial()) && skillLevel >= Config.getRepairGoldLevelRequirement() && mcPermissions.getInstance().goldRepair(player)) {
repairItem(player, is, new ItemStack(Config.rGold)); repairItem(player, is, new ItemStack(Config.getRepairGoldMaterial()));
xpHandler(player, PP, is, durabilityBefore, 8, true); xpHandler(player, PP, is, durabilityBefore, 8, true);
} }
else if (ItemChecks.isStringTool(is) && inventory.contains(Config.rString) && skillLevel >= Config.repairStringLevel && mcPermissions.getInstance().stringRepair(player)){ else if (ItemChecks.isStringTool(is) && inventory.contains(Config.getRepairStringMaterial()) && skillLevel >= Config.getRepairStringLevelRequirement() && mcPermissions.getInstance().stringRepair(player)){
repairItem(player, is, new ItemStack(Config.rString)); repairItem(player, is, new ItemStack(Config.getRepairStringMaterial()));
xpHandler(player, PP, is, durabilityBefore, 2, false); xpHandler(player, PP, is, durabilityBefore, 2, false);
} }
else { else {
@ -156,16 +156,16 @@ public class Repair {
public static int getArcaneForgingRank(PlayerProfile PP) { public static int getArcaneForgingRank(PlayerProfile PP) {
int skillLevel = PP.getSkillLevel(SkillType.REPAIR); int skillLevel = PP.getSkillLevel(SkillType.REPAIR);
if (skillLevel >= Config.arcaneRank4) { if (skillLevel >= Config.getArcaneForgingRankLevels4()) {
return 4; return 4;
} }
else if (skillLevel >= Config.arcaneRank3) { else if (skillLevel >= Config.getArcaneForgingRankLevels3()) {
return 3; return 3;
} }
else if (skillLevel >= Config.arcaneRank2) { else if (skillLevel >= Config.getArcaneForgingRankLevels2()) {
return 2; return 2;
} }
else if (skillLevel >= Config.arcaneRank1) { else if (skillLevel >= Config.getArcaneForgingRankLevels1()) {
return 1; return 1;
} }
else { else {
@ -204,7 +204,7 @@ public class Repair {
if (random.nextInt(100) <= getEnchantChance(rank)) { if (random.nextInt(100) <= getEnchantChance(rank)) {
int enchantLevel = enchant.getValue(); int enchantLevel = enchant.getValue();
if (Config.mayDowngradeEnchants && enchantLevel > 1) { if (Config.getArcaneForgingDowngradeEnabled() && enchantLevel > 1) {
if (random.nextInt(100) <= getDowngradeChance(rank)) { if (random.nextInt(100) <= getDowngradeChance(rank)) {
is.addEnchantment(enchantment, enchantLevel--); is.addEnchantment(enchantment, enchantLevel--);
downgraded = true; downgraded = true;
@ -238,16 +238,16 @@ public class Repair {
public static int getEnchantChance(int rank) { public static int getEnchantChance(int rank) {
switch (rank) { switch (rank) {
case 4: case 4:
return Config.keepEnchantsRank4; return Config.getArcaneForgingKeepEnchantsChanceRank4();
case 3: case 3:
return Config.keepEnchantsRank3; return Config.getArcaneForgingKeepEnchantsChanceRank3();
case 2: case 2:
return Config.keepEnchantsRank2; return Config.getArcaneForgingKeepEnchantsChanceRank2();
case 1: case 1:
return Config.keepEnchantsRank1; return Config.getArcaneForgingKeepEnchantsChanceRank1();
default: default:
return 0; return 0;
@ -263,16 +263,16 @@ public class Repair {
public static int getDowngradeChance(int rank) { public static int getDowngradeChance(int rank) {
switch (rank) { switch (rank) {
case 4: case 4:
return Config.downgradeRank4; return Config.getArcaneForgingDowngradeChanceRank4();
case 3: case 3:
return Config.downgradeRank3; return Config.getArcaneForgingDowngradeChanceRank3();
case 2: case 2:
return Config.downgradeRank2; return Config.getArcaneForgingDowngradeChanceRank2();
case 1: case 1:
return Config.downgradeRank1; return Config.getArcaneForgingDowngradeChanceRank1();
default: default:
return 100; return 100;
@ -356,45 +356,45 @@ public class Repair {
} }
else { else {
if (ItemChecks.isDiamondTool(is) || ItemChecks.isDiamondArmor(is)) { if (ItemChecks.isDiamondTool(is) || ItemChecks.isDiamondArmor(is)) {
if (skillLevel < Config.repairDiamondLevel) { if (skillLevel < Config.getRepairDiamondLevelRequirement()) {
player.sendMessage(mcLocale.getString("Repair.Skills.AdeptDiamond")); player.sendMessage(mcLocale.getString("Repair.Skills.AdeptDiamond"));
} }
else { else {
player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.BLUE + m.prettyItemString(Config.rDiamond)); player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.BLUE + m.prettyItemString(Config.getRepairDiamondMaterial()));
} }
} }
else if (ItemChecks.isIronTool(is) || ItemChecks.isIronArmor(is)) { else if (ItemChecks.isIronTool(is) || ItemChecks.isIronArmor(is)) {
if (skillLevel < Config.repairIronLevel) { if (skillLevel < Config.getRepairIronLevelRequirement()) {
player.sendMessage(mcLocale.getString("Repair.Skills.AdeptIron")); player.sendMessage(mcLocale.getString("Repair.Skills.AdeptIron"));
} }
else { else {
player.sendMessage(mcLocale.getString("Skills.NeedMore")+ " " + ChatColor.GRAY + m.prettyItemString(Config.rIron)); player.sendMessage(mcLocale.getString("Skills.NeedMore")+ " " + ChatColor.GRAY + m.prettyItemString(Config.getRepairIronMaterial()));
} }
} }
else if (ItemChecks.isGoldTool(is) || ItemChecks.isGoldArmor(is)) { else if (ItemChecks.isGoldTool(is) || ItemChecks.isGoldArmor(is)) {
if (skillLevel < Config.repairGoldLevel) { if (skillLevel < Config.getRepairGoldLevelRequirement()) {
player.sendMessage(mcLocale.getString("Repair.Skills.AdeptGold")); player.sendMessage(mcLocale.getString("Repair.Skills.AdeptGold"));
} }
else { else {
player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.GOLD + m.prettyItemString(Config.rGold)); player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.GOLD + m.prettyItemString(Config.getRepairGoldMaterial()));
} }
} }
else if (ItemChecks.isStoneTool(is)) { else if (ItemChecks.isStoneTool(is)) {
if (skillLevel < Config.repairStoneLevel) { if (skillLevel < Config.getRepairStoneLevelRequirement()) {
player.sendMessage(mcLocale.getString("Repair.Skills.AdeptStone")); player.sendMessage(mcLocale.getString("Repair.Skills.AdeptStone"));
} }
else { else {
player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.GRAY + m.prettyItemString(Config.rStone)); player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.GRAY + m.prettyItemString(Config.getRepairStoneMaterial()));
} }
} }
else if (ItemChecks.isWoodTool(is)) { else if (ItemChecks.isWoodTool(is)) {
player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.DARK_GREEN + m.prettyItemString(Config.rWood)); player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.DARK_GREEN + m.prettyItemString(Config.getRepairWoodMaterial()));
} }
else if (ItemChecks.isLeatherArmor(is)) { else if (ItemChecks.isLeatherArmor(is)) {
player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.YELLOW + m.prettyItemString(Config.rLeather)); player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.YELLOW + m.prettyItemString(Config.getRepairLeatherMaterial()));
} }
else if (ItemChecks.isStringTool(is)) { else if (ItemChecks.isStringTool(is)) {
player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.YELLOW + m.prettyItemString(Config.rString)); player.sendMessage(mcLocale.getString("Skills.NeedMore") + " " + ChatColor.YELLOW + m.prettyItemString(Config.getRepairStringMaterial()));
} }
} }
} }
@ -445,7 +445,7 @@ public class Repair {
} }
/* Handle the enchants */ /* Handle the enchants */
if (Config.mayLoseEnchants && !mcPermissions.getInstance().arcaneBypass(player)) { if (Config.getArcaneForgingEnchantLossEnabled() && !mcPermissions.getInstance().arcaneBypass(player)) {
addEnchants(player, item); addEnchants(player, item);
} }

View File

@ -213,7 +213,7 @@ public class Skills {
SpoutPlayer sPlayer = SpoutManager.getPlayer(player); SpoutPlayer sPlayer = SpoutManager.getPlayer(player);
if (sPlayer.isSpoutCraftEnabled()) { if (sPlayer.isSpoutCraftEnabled()) {
if (Config.xpbar) { if (Config.getSpoutXPBarEnabled()) {
SpoutStuff.updateXpBar(player); SpoutStuff.updateXpBar(player);
} }
@ -237,7 +237,7 @@ public class Skills {
if (skillups == 0 && Config.spoutEnabled && player instanceof SpoutPlayer) { if (skillups == 0 && Config.spoutEnabled && player instanceof SpoutPlayer) {
SpoutPlayer sPlayer = (SpoutPlayer) player; SpoutPlayer sPlayer = (SpoutPlayer) player;
if (sPlayer.isSpoutCraftEnabled()) { if (sPlayer.isSpoutCraftEnabled()) {
if (Config.xpbar) { if (Config.getSpoutXPBarEnabled()) {
SpoutStuff.updateXpBar(player); SpoutStuff.updateXpBar(player);
} }
} }