Well this should fix the issues with config, but I hate it.

This commit is contained in:
nossr50
2012-04-26 20:58:21 -07:00
parent bede658d94
commit 4fa3708c2f
38 changed files with 517 additions and 510 deletions

View File

@@ -80,7 +80,7 @@ public class Skills {
* @param skill The skill the ability is tied to
*/
public static void activationCheck(Player player, SkillType skill) {
if (Config.getAbilitiesOnlyActivateWhenSneaking() && !player.isSneaking()) {
if (Config.getInstance().getAbilitiesOnlyActivateWhenSneaking() && !player.isSneaking()) {
return;
}
@@ -111,7 +111,7 @@ public class Skills {
}
}
if (Config.getAbilityMessagesEnabled()) {
if (Config.getInstance().getAbilityMessagesEnabled()) {
player.sendMessage(tool.getRaiseTool());
}
@@ -201,7 +201,7 @@ public class Skills {
}
}
if (!Config.getUseMySQL()) {
if (!Config.getInstance().getUseMySQL()) {
ProcessLeaderboardUpdate(skillType, player);
ProcessLeaderboardUpdate(SkillType.ALL, player);
}
@@ -209,18 +209,18 @@ public class Skills {
String capitalized = m.getCapitalized(skillType.toString());
/* Spout Stuff */
if (Config.spoutEnabled && player instanceof SpoutPlayer) {
if (Config.getInstance().spoutEnabled && player instanceof SpoutPlayer) {
SpoutPlayer sPlayer = SpoutManager.getPlayer(player);
if (sPlayer.isSpoutCraftEnabled()) {
if (Config.getSpoutXPBarEnabled()) {
if (Config.getInstance().getSpoutXPBarEnabled()) {
SpoutStuff.updateXpBar(player);
}
SpoutStuff.levelUpNotification(skillType, sPlayer);
/* Update custom titles */
if (Config.getShowPowerLevelForSpout()) {
if (Config.getInstance().getShowPowerLevelForSpout()) {
sPlayer.setTitle(sPlayer.getName()+ "\n" + ChatColor.YELLOW + "P" + ChatColor.GOLD + "lvl" + ChatColor.WHITE + "." + ChatColor.GREEN + String.valueOf(PP.getPowerLevel()));
}
}
@@ -234,10 +234,10 @@ public class Skills {
}
/* Always update XP Bar (Check if no levels were gained first to remove redundancy) */
if (skillups == 0 && Config.spoutEnabled && player instanceof SpoutPlayer) {
if (skillups == 0 && Config.getInstance().spoutEnabled && player instanceof SpoutPlayer) {
SpoutPlayer sPlayer = (SpoutPlayer) player;
if (sPlayer.isSpoutCraftEnabled()) {
if (Config.getSpoutXPBarEnabled()) {
if (Config.getInstance().getSpoutXPBarEnabled()) {
SpoutStuff.updateXpBar(player);
}
}
@@ -349,7 +349,7 @@ public class Skills {
* @param durabilityLoss The durability to remove from the item
*/
public static void abilityDurabilityLoss(ItemStack inhand, int durabilityLoss) {
if (Config.getAbilitiesDamageTools()) {
if (Config.getInstance().getAbilitiesDamageTools()) {
if (!inhand.containsEnchantment(Enchantment.DURABILITY)) {
inhand.setDurability((short) (inhand.getDurability() + durabilityLoss));
}