mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 00:30:07 +01:00
Fix a handful of Javadoc issues - need to check through the rest later to ensure that we actually have updated JDs for everything
This commit is contained in:
parent
a1d710fe3d
commit
cd35df17ec
@ -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();
|
||||
|
@ -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) {
|
||||
|
@ -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<Player> nearMembers = PartyManager.getNearMembers(player, party, partyShareRange);
|
||||
|
@ -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<TrackedEntity> entityIterator = trackedEntities.iterator(); entityIterator.hasNext(); ) {
|
||||
|
@ -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);
|
||||
|
@ -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)) {
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -16,7 +16,7 @@ public interface RepairManager {
|
||||
/**
|
||||
* Register a list of repairables with the RepairManager
|
||||
*
|
||||
* @param repairable List<Repairable> to register
|
||||
* @param repairables List<Repairable> to register
|
||||
*/
|
||||
public void registerRepairables(List<Repairable> repairables);
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -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<Block> treeFellerBlocks, Player player) {
|
||||
|
@ -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);
|
||||
|
@ -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<PlayerStat> 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;
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user