Javadocs cleanup

This commit is contained in:
TfT_02 2013-08-10 20:10:45 +02:00
parent 4ff6b5fbc7
commit 90fcf35c34
20 changed files with 33 additions and 34 deletions

View File

@ -73,8 +73,6 @@ public class PartyLockCommand implements CommandExecutor {
/** /**
* Handle unlocking a party. * Handle unlocking a party.
*
* @return true if party is successfully unlocked, false otherwise.
*/ */
private void unlockParty(CommandSender sender, String permissionMessage) { private void unlockParty(CommandSender sender, String permissionMessage) {
if (!Permissions.partySubcommand(sender, PartySubcommandType.UNLOCK)) { if (!Permissions.partySubcommand(sender, PartySubcommandType.UNLOCK)) {

View File

@ -83,7 +83,7 @@ public interface DatabaseManager {
* Convert all users from this database to the provided database using * Convert all users from this database to the provided database using
* {@link #saveUser(PlayerProfile)}. * {@link #saveUser(PlayerProfile)}.
* *
* @param the DatabaseManager to save to * @param destination The DatabaseManager to save to
*/ */
public void convertUsers(DatabaseManager destination); public void convertUsers(DatabaseManager destination);
} }

View File

@ -33,7 +33,7 @@ public class DatabaseManagerFactory {
* stable. This method is subject to change and/or removal in future * stable. This method is subject to change and/or removal in future
* versions. * versions.
* *
* @param man the DatabaseManager class to use * @param clazz the DatabaseManager class to use
* @throws IllegalArgumentException if the provided class does not have * @throws IllegalArgumentException if the provided class does not have
* an empty constructor * an empty constructor
*/ */

View File

@ -912,7 +912,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
/** /**
* Get the Integer. Only return first row / first field. * Get the Integer. Only return first row / first field.
* *
* @param sql SQL query to execute * @param statement SQL query to execute
* @return the value in the first row / first field * @return the value in the first row / first field
*/ */
private int readInt(PreparedStatement statement) { private int readInt(PreparedStatement statement) {

View File

@ -21,8 +21,7 @@ public class McMMOPlayerLevelUpEvent extends McMMOPlayerExperienceEvent {
} }
/** /**
* @param levelsGained * @param levelsGained Set the number of levels gained in this event
* @return Set the number of levels gained in this event
*/ */
public void setLevelsGained(int levelsGained) { public void setLevelsGained(int levelsGained) {
this.levelsGained = levelsGained; this.levelsGained = levelsGained;

View File

@ -23,7 +23,7 @@ public class McMMOPlayerXpGainEvent extends McMMOPlayerExperienceEvent {
} }
/** /**
* @param xpGained int amount of experience gained in this event * @return int amount of experience gained in this event
*/ */
@Deprecated @Deprecated
public int getXpGained() { public int getXpGained() {

View File

@ -57,7 +57,7 @@ public final class ShareHandler {
/** /**
* Distribute Items amongst party members. * Distribute Items amongst party members.
* *
* @param item Item that will get shared * @param drop Item that will get shared
* @param mcMMOPlayer Player who picked up the item * @param mcMMOPlayer Player who picked up the item
* @return True if the item has been shared * @return True if the item has been shared
*/ */

View File

@ -66,7 +66,7 @@ public final class Fishing {
* Finds the possible drops of an entity * Finds the possible drops of an entity
* *
* @param target Targeted entity * @param target Targeted entity
* @param possibleDrops List of ItemStack that can be dropped * @return possibleDrops List of ItemStack that can be dropped
*/ */
protected static List<ShakeTreasure> findPossibleDrops(LivingEntity target) { protected static List<ShakeTreasure> findPossibleDrops(LivingEntity target) {
switch (target.getType()) { switch (target.getType()) {

View File

@ -355,7 +355,7 @@ public class FishingManager extends SkillManager {
/** /**
* Handle the Shake ability * Handle the Shake ability
* *
* @param mob The {@link LivingEntity} affected by the ability * @param target The {@link LivingEntity} affected by the ability
*/ */
public void shakeCheck(LivingEntity target) { public void shakeCheck(LivingEntity target) {
fishingTries--; // Because autoclicking to shake is OK. fishingTries--; // Because autoclicking to shake is OK.

View File

@ -270,7 +270,7 @@ public class HerbalismManager extends SkillManager {
* Process the Green Thumb ability for plants. * Process the Green Thumb ability for plants.
* *
* @param blockState The {@link BlockState} to check ability activation for * @param blockState The {@link BlockState} to check ability activation for
* @param greenTerra * @param greenTerra boolean to determine if greenTerra is active or not
*/ */
private void processGreenThumbPlants(BlockState blockState, boolean greenTerra) { private void processGreenThumbPlants(BlockState blockState, boolean greenTerra) {
Player player = getPlayer(); Player player = getPlayer();

View File

@ -119,7 +119,8 @@ public class MiningManager extends SkillManager {
/** /**
* Handler for explosion drops and XP gain. * Handler for explosion drops and XP gain.
* *
* @param event Event whose explosion is being processed * @param yield
* @param blockList
*/ */
public void blastMiningDropProcessing(float yield, List<Block> blockList) { public void blastMiningDropProcessing(float yield, List<Block> blockList) {
List<BlockState> ores = new ArrayList<BlockState>(); List<BlockState> ores = new ArrayList<BlockState>();
@ -173,7 +174,8 @@ public class MiningManager extends SkillManager {
/** /**
* Increases the blast radius of the explosion. * Increases the blast radius of the explosion.
* *
* @param event Event whose explosion radius is being changed * @param radius to modify
* @return modified radius
*/ */
public float biggerBombs(float radius) { public float biggerBombs(float radius) {
return (float) (radius + getBlastRadiusModifier()); return (float) (radius + getBlastRadiusModifier());

View File

@ -34,7 +34,7 @@ public class RepairManager extends SkillManager {
/** /**
* Handles notifications for placing an anvil. * Handles notifications for placing an anvil.
* *
* @param anvilID The item ID of the anvil block * @param anvilId The item ID of the anvil block
*/ */
public void placedAnvilCheck(int anvilId) { public void placedAnvilCheck(int anvilId) {
Player player = getPlayer(); Player player = getPlayer();

View File

@ -57,7 +57,8 @@ public class Taming {
/** /**
* Apply the Sharpened Claws ability. * Apply the Sharpened Claws ability.
* *
* @param event The event to modify * @param damage The initial damage
* @return Damage with SharpenedClaws bonus damage
*/ */
public static double sharpenedClaws(double damage) { public static double sharpenedClaws(double damage) {
return damage + Taming.sharpenedClawsBonusDamage; return damage + Taming.sharpenedClawsBonusDamage;

View File

@ -61,7 +61,7 @@ public class TamingManager extends SkillManager {
/** /**
* Award XP for taming. * Award XP for taming.
* *
* @param event The event to award XP for * @param entity The LivingEntity to award XP for
*/ */
public void awardTamingXP(LivingEntity entity) { public void awardTamingXP(LivingEntity entity) {
switch (entity.getType()) { switch (entity.getType()) {
@ -100,7 +100,8 @@ public class TamingManager extends SkillManager {
/** /**
* Apply the Gore ability. * Apply the Gore ability.
* *
* @param event The event to modify * @param target The LivingEntity to apply Gore on
* @param damage The initial damage
*/ */
public double gore(LivingEntity target, double damage) { public double gore(LivingEntity target, double damage) {
if (SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Taming.goreMaxChance, Taming.goreMaxBonusLevel)) { if (SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Taming.goreMaxChance, Taming.goreMaxBonusLevel)) {

View File

@ -83,7 +83,6 @@ public final class Woodcutting {
/** /**
* Checks for double drops * Checks for double drops
* *
* @param mcMMOPlayer Player breaking the block
* @param blockState Block being broken * @param blockState Block being broken
*/ */
protected static void checkForDoubleDrop(BlockState blockState) { protected static void checkForDoubleDrop(BlockState blockState) {

View File

@ -120,7 +120,6 @@ public class WoodcuttingManager extends SkillManager {
* Handles the dropping of blocks * Handles the dropping of blocks
* *
* @param treeFellerBlocks List of blocks to be dropped * @param treeFellerBlocks List of blocks to be dropped
* @param player Player using the ability
*/ */
private void dropBlocks(List<BlockState> treeFellerBlocks) { private void dropBlocks(List<BlockState> treeFellerBlocks) {
Player player = getPlayer(); Player player = getPlayer();

View File

@ -99,7 +99,7 @@ public final class Misc {
* @param first The first location * @param first The first location
* @param second The second location * @param second The second location
* @param maxDistance The max distance apart * @param maxDistance The max distance apart
* @return true if the distance between <code>first</code> and <code>second</code> is less than <code>maxDistance</code>, false otherwise * @return true if the distance between {@code first} and {@code second} is less than {@code maxDistance}, false otherwise
*/ */
public static boolean isNear(Location first, Location second, double maxDistance) { public static boolean isNear(Location first, Location second, double maxDistance) {
if (first.getWorld() != second.getWorld()) { if (first.getWorld() != second.getWorld()) {
@ -142,11 +142,10 @@ public final class Misc {
} }
/** /**
* Randomly drop items at a given location. * Drop items with random quantity at a given location.
* *
* @param location The location to drop the items at * @param location The location to drop the items at
* @param is The item to drop * @param is The item to drop
* @param chance The percentage chance for the item to drop
* @param quantity The amount of items to drop * @param quantity The amount of items to drop
*/ */
public static void randomDropItems(Location location, ItemStack is, int quantity) { public static void randomDropItems(Location location, ItemStack is, int quantity) {

View File

@ -83,7 +83,7 @@ public final class ModUtils {
/** /**
* Check if a custom block is a woodcutting block. * Check if a custom block is a woodcutting block.
* *
* @param block The block to check * @param blockState The BlockState of the block to check
* @return true if the block represents a log, false otherwise * @return true if the block represents a log, false otherwise
*/ */
public static boolean isCustomWoodcuttingBlock(BlockState blockState) { public static boolean isCustomWoodcuttingBlock(BlockState blockState) {
@ -105,7 +105,7 @@ public final class ModUtils {
/** /**
* Check if a custom block should not activate abilites. * Check if a custom block should not activate abilites.
* *
* @param block The block to check * @param blockState The BlockState of the block to check
* @return true if the block represents an ability block, false otherwise * @return true if the block represents an ability block, false otherwise
*/ */
public static boolean isCustomAbilityBlock(BlockState blockState) { public static boolean isCustomAbilityBlock(BlockState blockState) {
@ -127,7 +127,7 @@ public final class ModUtils {
/** /**
* Check if a custom block is a mining block. * Check if a custom block is a mining block.
* *
* @param block The block to check * @param blockState The BlockState of the block to check
* @return true if the block is custom, false otherwise * @return true if the block is custom, false otherwise
*/ */
public static boolean isCustomMiningBlock(BlockState blockState) { public static boolean isCustomMiningBlock(BlockState blockState) {
@ -149,7 +149,7 @@ public final class ModUtils {
/** /**
* Check if a custom block is an excavation block. * Check if a custom block is an excavation block.
* *
* @param block The block to check * @param blockState The BlockState of the block to check
* @return true if the block is custom, false otherwise * @return true if the block is custom, false otherwise
*/ */
public static boolean isCustomExcavationBlock(BlockState blockState) { public static boolean isCustomExcavationBlock(BlockState blockState) {
@ -193,7 +193,7 @@ public final class ModUtils {
/** /**
* Check if a custom block is a leaf block. * Check if a custom block is a leaf block.
* *
* @param block The block to check * @param blockState The BlockState of the block to check
* @return true if the block represents leaves, false otherwise * @return true if the block represents leaves, false otherwise
*/ */
public static boolean isCustomLeafBlock(BlockState blockState) { public static boolean isCustomLeafBlock(BlockState blockState) {
@ -215,7 +215,7 @@ public final class ModUtils {
/** /**
* Check if a custom block is a log block. * Check if a custom block is a log block.
* *
* @param block The block to check * @param blockState The BlockState of the block to check
* @return true if the block represents a log, false otherwise * @return true if the block represents a log, false otherwise
*/ */
public static boolean isCustomLogBlock(BlockState blockState) { public static boolean isCustomLogBlock(BlockState blockState) {

View File

@ -136,7 +136,7 @@ public interface ChunkManager {
/** /**
* Check to see if a given BlockState location is set to true * Check to see if a given BlockState location is set to true
* *
* @param location BlockState location to check * @param blockState BlockState to check
* @return true if the given BlockState location is set to true, false if otherwise * @return true if the given BlockState location is set to true, false if otherwise
*/ */
public boolean isTrue(BlockState blockState); public boolean isTrue(BlockState blockState);
@ -161,7 +161,7 @@ public interface ChunkManager {
/** /**
* Set a given BlockState location to true, should create stores as necessary if the location does not exist * Set a given BlockState location to true, should create stores as necessary if the location does not exist
* *
* @param block BlockState location to set * @param blockState BlockState location to set
*/ */
public void setTrue(BlockState blockState); public void setTrue(BlockState blockState);
@ -185,7 +185,7 @@ public interface ChunkManager {
/** /**
* Set a given BlockState location to false, should not create stores if one does not exist for the given location * Set a given BlockState location to false, should not create stores if one does not exist for the given location
* *
* @param block BlockState location to set * @param blockState BlockState location to set
*/ */
public void setFalse(BlockState blockState); public void setFalse(BlockState blockState);

View File

@ -66,8 +66,9 @@ public final class PerksUtils {
/** /**
* Calculate activation chance for a skill. * Calculate activation chance for a skill.
* *
* @param isLucky true if the player has the appropriate "lucky" perk, false otherwise * @param player Player to check the activation chance for
* @return the activation chance * @param skill SkillType to check the activation chance of
* @return the activation chance with "lucky perk" accounted for
*/ */
public static int handleLuckyPerks(Player player, SkillType skill) { public static int handleLuckyPerks(Player player, SkillType skill) {
if (Permissions.lucky(player, skill)) { if (Permissions.lucky(player, skill)) {