From cd35df17ec2bc91a200a9b84c5416ffb253faa3d Mon Sep 17 00:00:00 2001 From: GJ Date: Wed, 30 Jan 2013 19:42:40 -0500 Subject: [PATCH] Fix a handful of Javadoc issues - need to check through the rest later to ensure that we actually have updated JDs for everything --- .../java/com/gmail/nossr50/datatypes/McMMOPlayer.java | 10 +++++----- src/main/java/com/gmail/nossr50/mods/ModChecks.java | 4 ++-- .../java/com/gmail/nossr50/party/ShareHandler.java | 5 ++--- .../com/gmail/nossr50/skills/archery/Archery.java | 2 +- .../com/gmail/nossr50/skills/axes/AxeManager.java | 3 ++- .../skills/mining/MiningBlockEventHandler.java | 3 --- .../gmail/nossr50/skills/mining/MiningManager.java | 4 ---- .../java/com/gmail/nossr50/skills/repair/Repair.java | 2 -- .../gmail/nossr50/skills/repair/RepairManager.java | 2 +- .../nossr50/skills/taming/BeastLoreEventHandler.java | 1 - .../gmail/nossr50/skills/unarmed/UnarmedManager.java | 1 - .../gmail/nossr50/skills/utilities/AbilityType.java | 2 +- .../gmail/nossr50/skills/utilities/CombatTools.java | 2 +- .../gmail/nossr50/skills/utilities/SkillTools.java | 2 +- .../com/gmail/nossr50/skills/utilities/SkillType.java | 2 +- .../gmail/nossr50/skills/woodcutting/TreeFeller.java | 2 +- .../java/com/gmail/nossr50/spout/popups/XpBar.java | 11 ++++++----- src/main/java/com/gmail/nossr50/util/Leaderboard.java | 10 +++++----- src/main/java/com/gmail/nossr50/util/Misc.java | 4 ++-- src/main/java/com/gmail/nossr50/util/Users.java | 4 ++-- 20 files changed, 33 insertions(+), 43 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/datatypes/McMMOPlayer.java b/src/main/java/com/gmail/nossr50/datatypes/McMMOPlayer.java index 4cd2cea11..4ec527c6f 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/McMMOPlayer.java +++ b/src/main/java/com/gmail/nossr50/datatypes/McMMOPlayer.java @@ -51,7 +51,7 @@ public class McMMOPlayer { * Adds XP to the player, doesn't calculate for XP Rate * * @param skillType The skill to add XP to - * @param newValue The amount of XP to add + * @param xp The amount of XP to add */ public void addXPOverride(SkillType skillType, int xp) { if (skillType.equals(SkillType.ALL)) { @@ -80,7 +80,7 @@ public class McMMOPlayer { * Adds XP to the player, this ignores skill modifiers. * * @param skillType The skill to add XP to - * @param newValue The amount of XP to add + * @param xp The amount of XP to add */ public void addXPOverrideBonus(SkillType skillType, int xp) { int modifiedXp = (int)Math.floor(xp * Config.getInstance().getExperienceGainsGlobalMultiplier()); @@ -91,9 +91,9 @@ public class McMMOPlayer { * Adds XP to the player, this is affected by skill modifiers and XP Rate and Permissions * * @param skillType The skill to add XP to - * @param newvalue The amount of XP to add + * @param xp The amount of XP to add */ - public void addXP(SkillType skillType, int newValue) { + public void addXP(SkillType skillType, int xp) { if (player == null) return; else if (player.getGameMode() == null) @@ -103,7 +103,7 @@ public class McMMOPlayer { return; } - int xp = (int)Math.floor((newValue / skillType.getXpModifier()) * Config.getInstance().getExperienceGainsGlobalMultiplier()); + xp = (int)Math.floor((xp / skillType.getXpModifier()) * Config.getInstance().getExperienceGainsGlobalMultiplier()); if (Config.getInstance().getToolModsEnabled()) { ItemStack item = player.getItemInHand(); diff --git a/src/main/java/com/gmail/nossr50/mods/ModChecks.java b/src/main/java/com/gmail/nossr50/mods/ModChecks.java index d0bcc7059..500841432 100644 --- a/src/main/java/com/gmail/nossr50/mods/ModChecks.java +++ b/src/main/java/com/gmail/nossr50/mods/ModChecks.java @@ -145,7 +145,7 @@ public final class ModChecks { /** * Checks to see if an item is a custom tool. * - * @param is Item to check + * @param item Item to check * @return true if the item is a custom tool, false otherwise */ public static boolean isCustomTool(ItemStack item) { @@ -159,7 +159,7 @@ public final class ModChecks { /** * Checks to see if an item is custom armor. * - * @param is Item to check + * @param item Item to check * @return true if the item is custom armor, false otherwise */ public static boolean isCustomArmor(ItemStack item) { diff --git a/src/main/java/com/gmail/nossr50/party/ShareHandler.java b/src/main/java/com/gmail/nossr50/party/ShareHandler.java index 1222b9221..738583dee 100644 --- a/src/main/java/com/gmail/nossr50/party/ShareHandler.java +++ b/src/main/java/com/gmail/nossr50/party/ShareHandler.java @@ -42,7 +42,7 @@ public class ShareHandler { /** * Calculate the party XP. * - * @param int XP without party sharing + * @param oldExp XP without party sharing * @return the party shared XP */ public static double calculateSharedExp(int oldExp, Player player, Party party) { @@ -60,8 +60,7 @@ public class ShareHandler { /** * Distribute XP amongst party members. * - * @param int XP without party sharing - * @return the party share experience + * @param xp XP without party sharing */ public static void handleEqualExpShare(int xp, Player player, Party party, SkillType skillType) { List nearMembers = PartyManager.getNearMembers(player, party, partyShareRange); diff --git a/src/main/java/com/gmail/nossr50/skills/archery/Archery.java b/src/main/java/com/gmail/nossr50/skills/archery/Archery.java index ab8142804..65f495f1c 100644 --- a/src/main/java/com/gmail/nossr50/skills/archery/Archery.java +++ b/src/main/java/com/gmail/nossr50/skills/archery/Archery.java @@ -56,7 +56,7 @@ public class Archery { /** * Check for arrow retrieval. * - * @param entity The entity hit by the arrows + * @param livingEntity The entity hit by the arrows */ public static void arrowRetrievalCheck(LivingEntity livingEntity) { for (Iterator entityIterator = trackedEntities.iterator(); entityIterator.hasNext(); ) { diff --git a/src/main/java/com/gmail/nossr50/skills/axes/AxeManager.java b/src/main/java/com/gmail/nossr50/skills/axes/AxeManager.java index a3afeb739..a89845511 100644 --- a/src/main/java/com/gmail/nossr50/skills/axes/AxeManager.java +++ b/src/main/java/com/gmail/nossr50/skills/axes/AxeManager.java @@ -60,7 +60,8 @@ public class AxeManager extends SkillManager { /** * Check for Skull Splitter ability. * - * @param event The event to process + * @param target The entity hit by Skull Splitter + * @param damage The base damage to deal */ public void skullSplitter(LivingEntity target, int damage) { SkullSplitterEventHandler eventHandler = new SkullSplitterEventHandler(player, damage, target); diff --git a/src/main/java/com/gmail/nossr50/skills/mining/MiningBlockEventHandler.java b/src/main/java/com/gmail/nossr50/skills/mining/MiningBlockEventHandler.java index f193228e5..a93db49f3 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/MiningBlockEventHandler.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/MiningBlockEventHandler.java @@ -35,9 +35,6 @@ public class MiningBlockEventHandler { /** * Process Mining block drops. - * - * @param player The player mining the block - * @param block The block being broken */ protected void processDrops() { if (player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) { 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 d78042f47..fff664769 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java @@ -23,8 +23,6 @@ public class MiningManager extends SkillManager{ * Detonate TNT for Blast Mining * * @param event The PlayerInteractEvent - * @param player Player detonating the TNT - * @param plugin mcMMO plugin instance */ public void detonate(PlayerInteractEvent event) { if (skillLevel < BlastMining.rank1) { @@ -92,7 +90,6 @@ public class MiningManager extends SkillManager{ /** * Increases the blast radius of the explosion. * - * @param player Player triggering the explosion * @param event Event whose explosion radius is being changed */ public void biggerBombs(ExplosionPrimeEvent event) { @@ -129,7 +126,6 @@ public class MiningManager extends SkillManager{ /** * Handle the Super Breaker ability. * - * @param player The player using the ability * @param block The block being affected */ public void superBreakerBlockCheck(Block block) { diff --git a/src/main/java/com/gmail/nossr50/skills/repair/Repair.java b/src/main/java/com/gmail/nossr50/skills/repair/Repair.java index 87cac9716..51947f7a9 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/Repair.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/Repair.java @@ -42,10 +42,8 @@ public class Repair { * * @param player Player repairing the item * @param profile PlayerProfile of the repairing player - * @param is Item being repaired * @param durabilityBefore Durability of the item before repair * @param modify Amount to modify the durability by - * @param boost True if the modifier is a boost, false if the modifier is a reduction */ protected static void xpHandler(Player player, PlayerProfile profile, short durabilityBefore, short durabilityAfter, double modify) { short dif = (short) (durabilityBefore - durabilityAfter); 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 9469fbff3..997d46bb3 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java @@ -16,7 +16,7 @@ public interface RepairManager { /** * Register a list of repairables with the RepairManager * - * @param repairable List to register + * @param repairables List to register */ public void registerRepairables(List repairables); diff --git a/src/main/java/com/gmail/nossr50/skills/taming/BeastLoreEventHandler.java b/src/main/java/com/gmail/nossr50/skills/taming/BeastLoreEventHandler.java index 7caad64b4..1a037bbdb 100644 --- a/src/main/java/com/gmail/nossr50/skills/taming/BeastLoreEventHandler.java +++ b/src/main/java/com/gmail/nossr50/skills/taming/BeastLoreEventHandler.java @@ -36,7 +36,6 @@ public class BeastLoreEventHandler { /** * Get the name of a tameable animal's owner. * - * @param beast The animal whose owner's name to get * @return the name of the animal's owner */ private String getOwnerName() { diff --git a/src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java b/src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java index 85bd560d3..d006b9460 100644 --- a/src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java +++ b/src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java @@ -40,7 +40,6 @@ public class UnarmedManager extends SkillManager { /** * Check for arrow deflection. * - * @param defender The defending player * @param event The event to modify */ public void deflectCheck(EntityDamageEvent event) { diff --git a/src/main/java/com/gmail/nossr50/skills/utilities/AbilityType.java b/src/main/java/com/gmail/nossr50/skills/utilities/AbilityType.java index 06bb2af6e..45c8fefa3 100644 --- a/src/main/java/com/gmail/nossr50/skills/utilities/AbilityType.java +++ b/src/main/java/com/gmail/nossr50/skills/utilities/AbilityType.java @@ -181,7 +181,7 @@ public enum AbilityType { /** * Check if a block is affected by this ability. * - * @param Block the block to check + * @param block the block to check * @return true if the block is affected by this ability, false otherwise */ public boolean blockCheck(Block block) { diff --git a/src/main/java/com/gmail/nossr50/skills/utilities/CombatTools.java b/src/main/java/com/gmail/nossr50/skills/utilities/CombatTools.java index 74e6938f2..39f45955c 100644 --- a/src/main/java/com/gmail/nossr50/skills/utilities/CombatTools.java +++ b/src/main/java/com/gmail/nossr50/skills/utilities/CombatTools.java @@ -554,7 +554,7 @@ public final class CombatTools { * Check to see if the given LivingEntity should be affected by a combat ability. * * @param player The attacking Player - * @param livingEntity The defending LivingEntity + * @param entity The defending Entity * @return true if the Entity should be damaged, false otherwise. */ public static boolean shouldBeAffected(Player player, Entity entity) { diff --git a/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java b/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java index b1aa554de..edff90519 100644 --- a/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java +++ b/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java @@ -312,7 +312,7 @@ public class SkillTools { /** * Checks if the given string represents a valid skill * - * @param skillname The name of the skill to check + * @param skillName The name of the skill to check * @return true if this is a valid skill, false otherwise */ public static boolean isSkill(String skillName) { diff --git a/src/main/java/com/gmail/nossr50/skills/utilities/SkillType.java b/src/main/java/com/gmail/nossr50/skills/utilities/SkillType.java index f329b4cb3..65adaabe4 100644 --- a/src/main/java/com/gmail/nossr50/skills/utilities/SkillType.java +++ b/src/main/java/com/gmail/nossr50/skills/utilities/SkillType.java @@ -138,7 +138,7 @@ public enum SkillType { * Get the skill level for this skill. * * @param player The player to check - * @return + * @return the player's skill level */ public int getSkillLevel(Player player) { return Users.getProfile(player).getSkillLevel(this); diff --git a/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java b/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java index aa2d33b18..8927b8f47 100644 --- a/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java +++ b/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java @@ -129,7 +129,7 @@ public final class TreeFeller { * Handles the durability loss * * @param treeFellerBlocks List of blocks to be removed - * @param Player Player using the ability + * @param player Player using the ability * @return True if the tool can sustain the durability loss */ private static boolean handleDurabilityLoss(List treeFellerBlocks, Player player) { diff --git a/src/main/java/com/gmail/nossr50/spout/popups/XpBar.java b/src/main/java/com/gmail/nossr50/spout/popups/XpBar.java index da0bfbb78..2d188f7d0 100644 --- a/src/main/java/com/gmail/nossr50/spout/popups/XpBar.java +++ b/src/main/java/com/gmail/nossr50/spout/popups/XpBar.java @@ -178,8 +178,8 @@ public class XpBar { /** * Update the XP bar. * - * @param skillType - * @param playerProfile + * @param skillType The skill last used + * @param playerProfile The profile of the player whose XP bar should be updated */ public void update(SkillType skillType, PlayerProfile playerProfile) { switch (playerProfile.getHudType()) { @@ -200,8 +200,8 @@ public class XpBar { /** * Update XP bar for Standard & Small styles. * - * @param skillType - * @param playerProfile + * @param skillType The skill last used + * @param playerProfile The profile of the player whose XP bar should be updated */ private void updateXpBarStandard(SkillType skillType, PlayerProfile playerProfile) { xpIcon.setUrl(Misc.getCapitalized(skillType.toString()) + ".png"); @@ -214,7 +214,8 @@ public class XpBar { /** * Update XP bar for Retro styles. * - * @param skillType + * @param skillType The skill last used + * @param playerProfile The profile of the player whose XP bar should be updated */ private void updateXpBarRetro(SkillType skillType, PlayerProfile playerProfile) { Color color = getRetroColor(skillType); diff --git a/src/main/java/com/gmail/nossr50/util/Leaderboard.java b/src/main/java/com/gmail/nossr50/util/Leaderboard.java index 52ecb8e04..981c3d0b5 100644 --- a/src/main/java/com/gmail/nossr50/util/Leaderboard.java +++ b/src/main/java/com/gmail/nossr50/util/Leaderboard.java @@ -166,11 +166,11 @@ public final class Leaderboard { /** * Retrieve leaderboard info. * - * @param skillName Skill to retrieve info on. - * @param pagenumber Which page in the leaderboards to retrieve + * @param skillType Skill to retrieve info on. + * @param pageNumber Which page in the leaderboards to retrieve * @return the requested leaderboard information */ - public static String[] retrieveInfo(SkillType skillType, int pagenumber) { + public static String[] retrieveInfo(SkillType skillType, int pageNumber) { String[] info = new String[10]; List statsList = playerStatHash.get(skillType); @@ -179,11 +179,11 @@ public final class Leaderboard { int destination; //How many lines to skip through - if (pagenumber == 1) { + if (pageNumber == 1) { destination = 0; } else { - destination = (pagenumber * 10) - 9; + destination = (pageNumber * 10) - 9; } int currentPos = 0; diff --git a/src/main/java/com/gmail/nossr50/util/Misc.java b/src/main/java/com/gmail/nossr50/util/Misc.java index 14737c608..05ad642e1 100644 --- a/src/main/java/com/gmail/nossr50/util/Misc.java +++ b/src/main/java/com/gmail/nossr50/util/Misc.java @@ -62,9 +62,9 @@ public final class Misc { } /** - * Check if a player has armor. + * Check if a LivingEntity has armor. * - * @param player Player whose armor to check + * @param entity LivingEntity whose armor to check * @return true if the player has armor, false otherwise */ public static boolean hasArmor(LivingEntity entity) { diff --git a/src/main/java/com/gmail/nossr50/util/Users.java b/src/main/java/com/gmail/nossr50/util/Users.java index 2bd1f997b..3b448df3a 100644 --- a/src/main/java/com/gmail/nossr50/util/Users.java +++ b/src/main/java/com/gmail/nossr50/util/Users.java @@ -94,7 +94,7 @@ public final class Users { /** * Get the profile of a player by name. * - * @param player The name of the player whose profile to retrieve + * @param playerName The name of the player whose profile to retrieve * @return the player's profile */ public static PlayerProfile getProfile(String playerName) { @@ -106,7 +106,7 @@ public final class Users { /** * Get the McMMOPlayer of a player by name. * - * @param player The name of the player whose McMMOPlayer to retrieve + * @param playerName The name of the player whose McMMOPlayer to retrieve * @return the player's McMMOPlayer object */ public static McMMOPlayer getPlayer(String playerName) {