From 2d66b8ed12c0995ec6ab81d448c7dcc892020212 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sat, 18 May 2013 22:41:42 +0200 Subject: [PATCH] Cleanup - fixing various formatting issues --- src/main/java/com/gmail/nossr50/api/ChatAPI.java | 2 +- src/main/java/com/gmail/nossr50/api/ExperienceAPI.java | 2 +- src/main/java/com/gmail/nossr50/chat/ChatManager.java | 2 +- src/main/java/com/gmail/nossr50/config/ConfigLoader.java | 2 +- .../java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java | 2 +- .../java/com/gmail/nossr50/datatypes/player/PlayerProfile.java | 2 +- src/main/java/com/gmail/nossr50/datatypes/skills/SkillType.java | 2 +- .../skills/abilities/McMMOPlayerAbilityDeactivateEvent.java | 2 +- .../java/com/gmail/nossr50/skills/fishing/FishingManager.java | 2 +- .../java/com/gmail/nossr50/skills/mining/MiningManager.java | 2 +- .../java/com/gmail/nossr50/skills/repair/RepairManager.java | 2 +- src/main/java/com/gmail/nossr50/skills/unarmed/Unarmed.java | 2 +- src/main/java/com/gmail/nossr50/util/ItemUtils.java | 2 +- src/main/resources/locale/locale_en_US.properties | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/api/ChatAPI.java b/src/main/java/com/gmail/nossr50/api/ChatAPI.java index 58ef88362..413e5d0ff 100644 --- a/src/main/java/com/gmail/nossr50/api/ChatAPI.java +++ b/src/main/java/com/gmail/nossr50/api/ChatAPI.java @@ -138,7 +138,7 @@ public final class ChatAPI { * * @param playerName The name of the player to toggle party chat on. */ - public static void toggleAdminChat(String playerName){ + public static void toggleAdminChat(String playerName) { UserManager.getPlayer(playerName).setAdminChat(!isUsingAdminChat(playerName)); } } diff --git a/src/main/java/com/gmail/nossr50/api/ExperienceAPI.java b/src/main/java/com/gmail/nossr50/api/ExperienceAPI.java index 7e24ab66e..3d239ea79 100644 --- a/src/main/java/com/gmail/nossr50/api/ExperienceAPI.java +++ b/src/main/java/com/gmail/nossr50/api/ExperienceAPI.java @@ -119,7 +119,7 @@ public final class ExperienceAPI { throw new InvalidSkillException(); } - UserManager.getPlayer(player).applyXpGain(skill, (int) (XP / skill.getXpModifier() * Config.getInstance().getExperienceGainsGlobalMultiplier())); + UserManager.getPlayer(player).applyXpGain(skill, (int) (XP / skill.getXpModifier() * Config.getInstance().getExperienceGainsGlobalMultiplier())); } /** diff --git a/src/main/java/com/gmail/nossr50/chat/ChatManager.java b/src/main/java/com/gmail/nossr50/chat/ChatManager.java index 551375786..bd44d0384 100644 --- a/src/main/java/com/gmail/nossr50/chat/ChatManager.java +++ b/src/main/java/com/gmail/nossr50/chat/ChatManager.java @@ -12,7 +12,7 @@ import com.gmail.nossr50.events.chat.McMMOPartyChatEvent; import com.gmail.nossr50.locale.LocaleLoader; public final class ChatManager { - public ChatManager () {} + public ChatManager() {} public static void handleAdminChat(Plugin plugin, String playerName, String displayName, String message, boolean isAsync) { McMMOAdminChatEvent chatEvent = new McMMOAdminChatEvent(plugin, playerName, displayName, message, isAsync); diff --git a/src/main/java/com/gmail/nossr50/config/ConfigLoader.java b/src/main/java/com/gmail/nossr50/config/ConfigLoader.java index c1e385e66..d5f68004a 100644 --- a/src/main/java/com/gmail/nossr50/config/ConfigLoader.java +++ b/src/main/java/com/gmail/nossr50/config/ConfigLoader.java @@ -57,7 +57,7 @@ public abstract class ConfigLoader { OutputStream outputStream = null; try { - outputStream = new FileOutputStream(configFile); + outputStream = new FileOutputStream(configFile); int read; byte[] bytes = new byte[1024]; diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java b/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java index db78ae2e5..36408f4f7 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java @@ -513,7 +513,7 @@ public class McMMOPlayer { return; } - + if (!Permissions.skillEnabled(player, skillType)) { return; } diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java index f46a8b27d..3e16a63a5 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java @@ -257,7 +257,7 @@ public class PlayerProfile { * @return the Xp remaining until next level */ public int getXpToLevel(SkillType skillType) { - return 1020 + (skills.get(skillType) * Config.getInstance().getFormulaMultiplierCurve()); + return 1020 + (skills.get(skillType) * Config.getInstance().getFormulaMultiplierCurve()); } private int getChildSkillLevel(SkillType skillType) { diff --git a/src/main/java/com/gmail/nossr50/datatypes/skills/SkillType.java b/src/main/java/com/gmail/nossr50/datatypes/skills/SkillType.java index 9ae25108b..c31a9a2d1 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/skills/SkillType.java +++ b/src/main/java/com/gmail/nossr50/datatypes/skills/SkillType.java @@ -170,7 +170,7 @@ public enum SkillType { return type; } } - + return null; } } diff --git a/src/main/java/com/gmail/nossr50/events/skills/abilities/McMMOPlayerAbilityDeactivateEvent.java b/src/main/java/com/gmail/nossr50/events/skills/abilities/McMMOPlayerAbilityDeactivateEvent.java index 41621c440..77b4fed92 100644 --- a/src/main/java/com/gmail/nossr50/events/skills/abilities/McMMOPlayerAbilityDeactivateEvent.java +++ b/src/main/java/com/gmail/nossr50/events/skills/abilities/McMMOPlayerAbilityDeactivateEvent.java @@ -14,7 +14,7 @@ public class McMMOPlayerAbilityDeactivateEvent extends McMMOPlayerSkillEvent { super(player, skill); this.ability = skill.getAbility(); } - + public AbilityType getAbility() { return ability; } diff --git a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java index 7b59d4dce..c06f59d3f 100644 --- a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java @@ -219,7 +219,7 @@ public class FishingManager extends SkillManager { // Make a hole block.setType(Material.STATIONARY_WATER); - for (int x = -1; x <= 1; x++) { + for (int x = -1; x <= 1; x++) { for (int z = -1; z <= 1; z++) { Block relative = block.getRelative(x, 0, z); diff --git a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java index db45cfa57..b77ff40b3 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java @@ -27,7 +27,7 @@ import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.skills.SkillUtils; -public class MiningManager extends SkillManager{ +public class MiningManager extends SkillManager { public MiningManager(McMMOPlayer mcMMOPlayer) { super(mcMMOPlayer, SkillType.MINING); } diff --git a/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java b/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java index f22fada19..61aec5c66 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java @@ -195,7 +195,7 @@ public class RepairManager extends SkillManager { Player player = getPlayer(); McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player); - long LastUse = mcMMOPlayer.getLastAnvilUse(anvilId); + long LastUse = mcMMOPlayer.getLastAnvilUse(anvilId); // Don't use SkillUtils.cooldownOver() here since that also accounts for the cooldown perks if ((((LastUse + 3) * Misc.TIME_CONVERSION_FACTOR) >= System.currentTimeMillis()) || !Config.getInstance().getRepairConfirmRequired()) { diff --git a/src/main/java/com/gmail/nossr50/skills/unarmed/Unarmed.java b/src/main/java/com/gmail/nossr50/skills/unarmed/Unarmed.java index 80e820e6e..3ea0f16e6 100644 --- a/src/main/java/com/gmail/nossr50/skills/unarmed/Unarmed.java +++ b/src/main/java/com/gmail/nossr50/skills/unarmed/Unarmed.java @@ -43,7 +43,7 @@ public class Unarmed { ItemStack addStack = itemstack.clone(); - if (dropAmount + itemAmount <= itemMax) { + if (dropAmount + itemAmount <= itemMax) { drop.remove(); addStack.setAmount(dropAmount + itemAmount); inventory.setItem(nextSlot, addStack); diff --git a/src/main/java/com/gmail/nossr50/util/ItemUtils.java b/src/main/java/com/gmail/nossr50/util/ItemUtils.java index da21b2e39..fdc62e045 100644 --- a/src/main/java/com/gmail/nossr50/util/ItemUtils.java +++ b/src/main/java/com/gmail/nossr50/util/ItemUtils.java @@ -660,6 +660,6 @@ public class ItemUtils { } ItemMeta itemMeta = item.getItemMeta(); - return itemMeta.hasDisplayName() && itemMeta.getDisplayName().equals(ChatColor.GOLD + LocaleLoader.getString("Item.ChimaeraWing.Name")); + return itemMeta.hasDisplayName() && itemMeta.getDisplayName().equals(ChatColor.GOLD + LocaleLoader.getString("Item.ChimaeraWing.Name")); } } diff --git a/src/main/resources/locale/locale_en_US.properties b/src/main/resources/locale/locale_en_US.properties index de1fb2abb..45f72b281 100644 --- a/src/main/resources/locale/locale_en_US.properties +++ b/src/main/resources/locale/locale_en_US.properties @@ -659,7 +659,7 @@ Skills.Parents = PARENTS Skills.Stats=[[YELLOW]]{0}[[GREEN]]{1}[[DARK_AQUA]] XP([[GRAY]]{2}[[DARK_AQUA]]/[[GRAY]]{3}[[DARK_AQUA]]) Skills.TooTired=[[RED]]You are too tired to use that ability again. [[YELLOW]]({0}s) Skills.Cancelled=[[RED]]{0} cancelled! -Skills.ConfirmOrCancel=[[GREEN]]Right-click again to confirm [[GOLD]]{0} [[GREEN]]. Left-click to cancel. +Skills.ConfirmOrCancel=[[GREEN]]Right-click again to confirm [[GOLD]]{0}[[GREEN]]. Left-click to cancel. #STATISTICS Stats.Header.Combat=[[GOLD]]-=COMBAT SKILLS=-