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
|
* Adds XP to the player, doesn't calculate for XP Rate
|
||||||
*
|
*
|
||||||
* @param skillType The skill to add XP to
|
* @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) {
|
public void addXPOverride(SkillType skillType, int xp) {
|
||||||
if (skillType.equals(SkillType.ALL)) {
|
if (skillType.equals(SkillType.ALL)) {
|
||||||
@ -80,7 +80,7 @@ public class McMMOPlayer {
|
|||||||
* Adds XP to the player, this ignores skill modifiers.
|
* Adds XP to the player, this ignores skill modifiers.
|
||||||
*
|
*
|
||||||
* @param skillType The skill to add XP to
|
* @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) {
|
public void addXPOverrideBonus(SkillType skillType, int xp) {
|
||||||
int modifiedXp = (int)Math.floor(xp * Config.getInstance().getExperienceGainsGlobalMultiplier());
|
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
|
* 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 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)
|
if (player == null)
|
||||||
return;
|
return;
|
||||||
else if (player.getGameMode() == null)
|
else if (player.getGameMode() == null)
|
||||||
@ -103,7 +103,7 @@ public class McMMOPlayer {
|
|||||||
return;
|
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()) {
|
if (Config.getInstance().getToolModsEnabled()) {
|
||||||
ItemStack item = player.getItemInHand();
|
ItemStack item = player.getItemInHand();
|
||||||
|
@ -145,7 +145,7 @@ public final class ModChecks {
|
|||||||
/**
|
/**
|
||||||
* Checks to see if an item is a custom tool.
|
* 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
|
* @return true if the item is a custom tool, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isCustomTool(ItemStack item) {
|
public static boolean isCustomTool(ItemStack item) {
|
||||||
@ -159,7 +159,7 @@ public final class ModChecks {
|
|||||||
/**
|
/**
|
||||||
* Checks to see if an item is custom armor.
|
* 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
|
* @return true if the item is custom armor, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isCustomArmor(ItemStack item) {
|
public static boolean isCustomArmor(ItemStack item) {
|
||||||
|
@ -42,7 +42,7 @@ public class ShareHandler {
|
|||||||
/**
|
/**
|
||||||
* Calculate the party XP.
|
* Calculate the party XP.
|
||||||
*
|
*
|
||||||
* @param int XP without party sharing
|
* @param oldExp XP without party sharing
|
||||||
* @return the party shared XP
|
* @return the party shared XP
|
||||||
*/
|
*/
|
||||||
public static double calculateSharedExp(int oldExp, Player player, Party party) {
|
public static double calculateSharedExp(int oldExp, Player player, Party party) {
|
||||||
@ -60,8 +60,7 @@ public class ShareHandler {
|
|||||||
/**
|
/**
|
||||||
* Distribute XP amongst party members.
|
* Distribute XP amongst party members.
|
||||||
*
|
*
|
||||||
* @param int XP without party sharing
|
* @param xp XP without party sharing
|
||||||
* @return the party share experience
|
|
||||||
*/
|
*/
|
||||||
public static void handleEqualExpShare(int xp, Player player, Party party, SkillType skillType) {
|
public static void handleEqualExpShare(int xp, Player player, Party party, SkillType skillType) {
|
||||||
List<Player> nearMembers = PartyManager.getNearMembers(player, party, partyShareRange);
|
List<Player> nearMembers = PartyManager.getNearMembers(player, party, partyShareRange);
|
||||||
|
@ -56,7 +56,7 @@ public class Archery {
|
|||||||
/**
|
/**
|
||||||
* Check for arrow retrieval.
|
* 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) {
|
public static void arrowRetrievalCheck(LivingEntity livingEntity) {
|
||||||
for (Iterator<TrackedEntity> entityIterator = trackedEntities.iterator(); entityIterator.hasNext(); ) {
|
for (Iterator<TrackedEntity> entityIterator = trackedEntities.iterator(); entityIterator.hasNext(); ) {
|
||||||
|
@ -60,7 +60,8 @@ public class AxeManager extends SkillManager {
|
|||||||
/**
|
/**
|
||||||
* Check for Skull Splitter ability.
|
* 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) {
|
public void skullSplitter(LivingEntity target, int damage) {
|
||||||
SkullSplitterEventHandler eventHandler = new SkullSplitterEventHandler(player, damage, target);
|
SkullSplitterEventHandler eventHandler = new SkullSplitterEventHandler(player, damage, target);
|
||||||
|
@ -35,9 +35,6 @@ public class MiningBlockEventHandler {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Process Mining block drops.
|
* Process Mining block drops.
|
||||||
*
|
|
||||||
* @param player The player mining the block
|
|
||||||
* @param block The block being broken
|
|
||||||
*/
|
*/
|
||||||
protected void processDrops() {
|
protected void processDrops() {
|
||||||
if (player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) {
|
if (player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) {
|
||||||
|
@ -23,8 +23,6 @@ public class MiningManager extends SkillManager{
|
|||||||
* Detonate TNT for Blast Mining
|
* Detonate TNT for Blast Mining
|
||||||
*
|
*
|
||||||
* @param event The PlayerInteractEvent
|
* @param event The PlayerInteractEvent
|
||||||
* @param player Player detonating the TNT
|
|
||||||
* @param plugin mcMMO plugin instance
|
|
||||||
*/
|
*/
|
||||||
public void detonate(PlayerInteractEvent event) {
|
public void detonate(PlayerInteractEvent event) {
|
||||||
if (skillLevel < BlastMining.rank1) {
|
if (skillLevel < BlastMining.rank1) {
|
||||||
@ -92,7 +90,6 @@ public class MiningManager extends SkillManager{
|
|||||||
/**
|
/**
|
||||||
* Increases the blast radius of the explosion.
|
* Increases the blast radius of the explosion.
|
||||||
*
|
*
|
||||||
* @param player Player triggering the explosion
|
|
||||||
* @param event Event whose explosion radius is being changed
|
* @param event Event whose explosion radius is being changed
|
||||||
*/
|
*/
|
||||||
public void biggerBombs(ExplosionPrimeEvent event) {
|
public void biggerBombs(ExplosionPrimeEvent event) {
|
||||||
@ -129,7 +126,6 @@ public class MiningManager extends SkillManager{
|
|||||||
/**
|
/**
|
||||||
* Handle the Super Breaker ability.
|
* Handle the Super Breaker ability.
|
||||||
*
|
*
|
||||||
* @param player The player using the ability
|
|
||||||
* @param block The block being affected
|
* @param block The block being affected
|
||||||
*/
|
*/
|
||||||
public void superBreakerBlockCheck(Block block) {
|
public void superBreakerBlockCheck(Block block) {
|
||||||
|
@ -42,10 +42,8 @@ public class Repair {
|
|||||||
*
|
*
|
||||||
* @param player Player repairing the item
|
* @param player Player repairing the item
|
||||||
* @param profile PlayerProfile of the repairing player
|
* @param profile PlayerProfile of the repairing player
|
||||||
* @param is Item being repaired
|
|
||||||
* @param durabilityBefore Durability of the item before repair
|
* @param durabilityBefore Durability of the item before repair
|
||||||
* @param modify Amount to modify the durability by
|
* @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) {
|
protected static void xpHandler(Player player, PlayerProfile profile, short durabilityBefore, short durabilityAfter, double modify) {
|
||||||
short dif = (short) (durabilityBefore - durabilityAfter);
|
short dif = (short) (durabilityBefore - durabilityAfter);
|
||||||
|
@ -16,7 +16,7 @@ public interface RepairManager {
|
|||||||
/**
|
/**
|
||||||
* Register a list of repairables with the 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);
|
public void registerRepairables(List<Repairable> repairables);
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@ public class BeastLoreEventHandler {
|
|||||||
/**
|
/**
|
||||||
* Get the name of a tameable animal's owner.
|
* 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
|
* @return the name of the animal's owner
|
||||||
*/
|
*/
|
||||||
private String getOwnerName() {
|
private String getOwnerName() {
|
||||||
|
@ -40,7 +40,6 @@ public class UnarmedManager extends SkillManager {
|
|||||||
/**
|
/**
|
||||||
* Check for arrow deflection.
|
* Check for arrow deflection.
|
||||||
*
|
*
|
||||||
* @param defender The defending player
|
|
||||||
* @param event The event to modify
|
* @param event The event to modify
|
||||||
*/
|
*/
|
||||||
public void deflectCheck(EntityDamageEvent event) {
|
public void deflectCheck(EntityDamageEvent event) {
|
||||||
|
@ -181,7 +181,7 @@ public enum AbilityType {
|
|||||||
/**
|
/**
|
||||||
* Check if a block is affected by this ability.
|
* 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
|
* @return true if the block is affected by this ability, false otherwise
|
||||||
*/
|
*/
|
||||||
public boolean blockCheck(Block block) {
|
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.
|
* Check to see if the given LivingEntity should be affected by a combat ability.
|
||||||
*
|
*
|
||||||
* @param player The attacking Player
|
* @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.
|
* @return true if the Entity should be damaged, false otherwise.
|
||||||
*/
|
*/
|
||||||
public static boolean shouldBeAffected(Player player, Entity entity) {
|
public static boolean shouldBeAffected(Player player, Entity entity) {
|
||||||
|
@ -312,7 +312,7 @@ public class SkillTools {
|
|||||||
/**
|
/**
|
||||||
* Checks if the given string represents a valid skill
|
* 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
|
* @return true if this is a valid skill, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isSkill(String skillName) {
|
public static boolean isSkill(String skillName) {
|
||||||
|
@ -138,7 +138,7 @@ public enum SkillType {
|
|||||||
* Get the skill level for this skill.
|
* Get the skill level for this skill.
|
||||||
*
|
*
|
||||||
* @param player The player to check
|
* @param player The player to check
|
||||||
* @return
|
* @return the player's skill level
|
||||||
*/
|
*/
|
||||||
public int getSkillLevel(Player player) {
|
public int getSkillLevel(Player player) {
|
||||||
return Users.getProfile(player).getSkillLevel(this);
|
return Users.getProfile(player).getSkillLevel(this);
|
||||||
|
@ -129,7 +129,7 @@ public final class TreeFeller {
|
|||||||
* Handles the durability loss
|
* Handles the durability loss
|
||||||
*
|
*
|
||||||
* @param treeFellerBlocks List of blocks to be removed
|
* @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
|
* @return True if the tool can sustain the durability loss
|
||||||
*/
|
*/
|
||||||
private static boolean handleDurabilityLoss(List<Block> treeFellerBlocks, Player player) {
|
private static boolean handleDurabilityLoss(List<Block> treeFellerBlocks, Player player) {
|
||||||
|
@ -178,8 +178,8 @@ public class XpBar {
|
|||||||
/**
|
/**
|
||||||
* Update the XP bar.
|
* Update the XP bar.
|
||||||
*
|
*
|
||||||
* @param skillType
|
* @param skillType The skill last used
|
||||||
* @param playerProfile
|
* @param playerProfile The profile of the player whose XP bar should be updated
|
||||||
*/
|
*/
|
||||||
public void update(SkillType skillType, PlayerProfile playerProfile) {
|
public void update(SkillType skillType, PlayerProfile playerProfile) {
|
||||||
switch (playerProfile.getHudType()) {
|
switch (playerProfile.getHudType()) {
|
||||||
@ -200,8 +200,8 @@ public class XpBar {
|
|||||||
/**
|
/**
|
||||||
* Update XP bar for Standard & Small styles.
|
* Update XP bar for Standard & Small styles.
|
||||||
*
|
*
|
||||||
* @param skillType
|
* @param skillType The skill last used
|
||||||
* @param playerProfile
|
* @param playerProfile The profile of the player whose XP bar should be updated
|
||||||
*/
|
*/
|
||||||
private void updateXpBarStandard(SkillType skillType, PlayerProfile playerProfile) {
|
private void updateXpBarStandard(SkillType skillType, PlayerProfile playerProfile) {
|
||||||
xpIcon.setUrl(Misc.getCapitalized(skillType.toString()) + ".png");
|
xpIcon.setUrl(Misc.getCapitalized(skillType.toString()) + ".png");
|
||||||
@ -214,7 +214,8 @@ public class XpBar {
|
|||||||
/**
|
/**
|
||||||
* Update XP bar for Retro styles.
|
* 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) {
|
private void updateXpBarRetro(SkillType skillType, PlayerProfile playerProfile) {
|
||||||
Color color = getRetroColor(skillType);
|
Color color = getRetroColor(skillType);
|
||||||
|
@ -166,11 +166,11 @@ public final class Leaderboard {
|
|||||||
/**
|
/**
|
||||||
* Retrieve leaderboard info.
|
* Retrieve leaderboard info.
|
||||||
*
|
*
|
||||||
* @param skillName Skill to retrieve info on.
|
* @param skillType Skill to retrieve info on.
|
||||||
* @param pagenumber Which page in the leaderboards to retrieve
|
* @param pageNumber Which page in the leaderboards to retrieve
|
||||||
* @return the requested leaderboard information
|
* @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];
|
String[] info = new String[10];
|
||||||
|
|
||||||
List<PlayerStat> statsList = playerStatHash.get(skillType);
|
List<PlayerStat> statsList = playerStatHash.get(skillType);
|
||||||
@ -179,11 +179,11 @@ public final class Leaderboard {
|
|||||||
int destination;
|
int destination;
|
||||||
|
|
||||||
//How many lines to skip through
|
//How many lines to skip through
|
||||||
if (pagenumber == 1) {
|
if (pageNumber == 1) {
|
||||||
destination = 0;
|
destination = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
destination = (pagenumber * 10) - 9;
|
destination = (pageNumber * 10) - 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
int currentPos = 0;
|
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
|
* @return true if the player has armor, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean hasArmor(LivingEntity entity) {
|
public static boolean hasArmor(LivingEntity entity) {
|
||||||
|
@ -94,7 +94,7 @@ public final class Users {
|
|||||||
/**
|
/**
|
||||||
* Get the profile of a player by name.
|
* 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
|
* @return the player's profile
|
||||||
*/
|
*/
|
||||||
public static PlayerProfile getProfile(String playerName) {
|
public static PlayerProfile getProfile(String playerName) {
|
||||||
@ -106,7 +106,7 @@ public final class Users {
|
|||||||
/**
|
/**
|
||||||
* Get the McMMOPlayer of a player by name.
|
* 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
|
* @return the player's McMMOPlayer object
|
||||||
*/
|
*/
|
||||||
public static McMMOPlayer getPlayer(String playerName) {
|
public static McMMOPlayer getPlayer(String playerName) {
|
||||||
|
Loading…
Reference in New Issue
Block a user