mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-04-04 10:46:23 +02:00
Functions that start with capital letters are bad.
This commit is contained in:
parent
2b291954cf
commit
2a27048174
@ -16,10 +16,10 @@ public class ExperienceAPI {
|
|||||||
*/
|
*/
|
||||||
private void checkXP(Player player, SkillType skillType) {
|
private void checkXP(Player player, SkillType skillType) {
|
||||||
if (skillType.equals(SkillType.ALL)) {
|
if (skillType.equals(SkillType.ALL)) {
|
||||||
Skills.XpCheckAll(player);
|
Skills.xpCheckAll(player);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Skills.XpCheckSkill(skillType, player);
|
Skills.xpCheckSkill(skillType, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,10 +59,10 @@ public class AddxpCommand implements CommandExecutor {
|
|||||||
modifiedPlayer.sendMessage(ChatColor.GREEN + "You were awarded " + xp + " experience in " + skillName + "!"); //TODO: Needs more locale.
|
modifiedPlayer.sendMessage(ChatColor.GREEN + "You were awarded " + xp + " experience in " + skillName + "!"); //TODO: Needs more locale.
|
||||||
|
|
||||||
if (skill.equals(SkillType.ALL)) {
|
if (skill.equals(SkillType.ALL)) {
|
||||||
Skills.XpCheckAll(modifiedPlayer);
|
Skills.xpCheckAll(modifiedPlayer);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Skills.XpCheckSkill(skill, modifiedPlayer);
|
Skills.xpCheckSkill(skill, modifiedPlayer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -109,10 +109,10 @@ public class AddxpCommand implements CommandExecutor {
|
|||||||
modifiedPlayer.sendMessage(ChatColor.GREEN + "You were awarded " + xp + " experience in " + skillName + "!"); //TODO: Needs more locale.
|
modifiedPlayer.sendMessage(ChatColor.GREEN + "You were awarded " + xp + " experience in " + skillName + "!"); //TODO: Needs more locale.
|
||||||
|
|
||||||
if (skill.equals(SkillType.ALL)) {
|
if (skill.equals(SkillType.ALL)) {
|
||||||
Skills.XpCheckAll(modifiedPlayer);
|
Skills.xpCheckAll(modifiedPlayer);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Skills.XpCheckSkill(skill, modifiedPlayer);
|
Skills.xpCheckSkill(skill, modifiedPlayer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -314,7 +314,7 @@ public class EntityListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PP.addXP(player, SkillType.TAMING, xp);
|
PP.addXP(player, SkillType.TAMING, xp);
|
||||||
Skills.XpCheckSkill(SkillType.TAMING, player);
|
Skills.xpCheckSkill(SkillType.TAMING, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,6 @@ public class GainXp implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PP.addXP(player, skillType, (int) (damage * baseXp));
|
PP.addXP(player, skillType, (int) (damage * baseXp));
|
||||||
Skills.XpCheckSkill(skillType, player);
|
Skills.xpCheckSkill(skillType, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ public class Excavation {
|
|||||||
|
|
||||||
//Handle XP related tasks
|
//Handle XP related tasks
|
||||||
PP.addXP(player, SkillType.EXCAVATION, xp);
|
PP.addXP(player, SkillType.EXCAVATION, xp);
|
||||||
Skills.XpCheckSkill(SkillType.EXCAVATION, player);
|
Skills.xpCheckSkill(SkillType.EXCAVATION, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -118,7 +118,7 @@ public class Fishing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PP.addXP(player, SkillType.FISHING, Config.getInstance().getFishingBaseXP());
|
PP.addXP(player, SkillType.FISHING, Config.getInstance().getFishingBaseXP());
|
||||||
Skills.XpCheckSkill(SkillType.FISHING, player);
|
Skills.xpCheckSkill(SkillType.FISHING, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -289,7 +289,7 @@ public class Herbalism {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PP.addXP(player, SkillType.HERBALISM, xp);
|
PP.addXP(player, SkillType.HERBALISM, xp);
|
||||||
Skills.XpCheckSkill(SkillType.HERBALISM, player);
|
Skills.xpCheckSkill(SkillType.HERBALISM, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -276,7 +276,7 @@ public class Mining {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PP.addXP(player, SkillType.MINING, xp);
|
PP.addXP(player, SkillType.MINING, xp);
|
||||||
Skills.XpCheckSkill(SkillType.MINING, player);
|
Skills.xpCheckSkill(SkillType.MINING, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -204,7 +204,7 @@ public class WoodCutting {
|
|||||||
|
|
||||||
if (Permissions.getInstance().woodcutting(player)) {
|
if (Permissions.getInstance().woodcutting(player)) {
|
||||||
PP.addXP(player, SkillType.WOODCUTTING, xp); //Tree Feller gives nerf'd XP
|
PP.addXP(player, SkillType.WOODCUTTING, xp); //Tree Feller gives nerf'd XP
|
||||||
Skills.XpCheckSkill(SkillType.WOODCUTTING, player);
|
Skills.xpCheckSkill(SkillType.WOODCUTTING, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,7 +385,7 @@ public class WoodCutting {
|
|||||||
|
|
||||||
WoodCutting.woodCuttingProcCheck(player, block);
|
WoodCutting.woodCuttingProcCheck(player, block);
|
||||||
PP.addXP(player, SkillType.WOODCUTTING, xp);
|
PP.addXP(player, SkillType.WOODCUTTING, xp);
|
||||||
Skills.XpCheckSkill(SkillType.WOODCUTTING, player);
|
Skills.xpCheckSkill(SkillType.WOODCUTTING, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,7 +59,7 @@ public class Acrobatics {
|
|||||||
/* Check for death */
|
/* Check for death */
|
||||||
if (health - damage >= 1) {
|
if (health - damage >= 1) {
|
||||||
PP.addXP(player, SkillType.ACROBATICS, damage * ROLL_XP_MODIFIER);
|
PP.addXP(player, SkillType.ACROBATICS, damage * ROLL_XP_MODIFIER);
|
||||||
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
Skills.xpCheckSkill(SkillType.ACROBATICS, player);
|
||||||
|
|
||||||
event.setDamage(newDamage);
|
event.setDamage(newDamage);
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ public class Acrobatics {
|
|||||||
}
|
}
|
||||||
else if (health - damage >= 1) {
|
else if (health - damage >= 1) {
|
||||||
PP.addXP(player, SkillType.ACROBATICS, event.getDamage() * FALL_XP_MODIFIER);
|
PP.addXP(player, SkillType.ACROBATICS, event.getDamage() * FALL_XP_MODIFIER);
|
||||||
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
Skills.xpCheckSkill(SkillType.ACROBATICS, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ public class Acrobatics {
|
|||||||
|
|
||||||
if (System.currentTimeMillis() >= (5000 + PPd.getRespawnATS()) && defender.getHealth() >= 1) {
|
if (System.currentTimeMillis() >= (5000 + PPd.getRespawnATS()) && defender.getHealth() >= 1) {
|
||||||
PPd.addXP(defender, SkillType.ACROBATICS, damage * DODGE_MODIFIER);
|
PPd.addXP(defender, SkillType.ACROBATICS, damage * DODGE_MODIFIER);
|
||||||
Skills.XpCheckSkill(SkillType.ACROBATICS, defender);
|
Skills.xpCheckSkill(SkillType.ACROBATICS, defender);
|
||||||
}
|
}
|
||||||
|
|
||||||
int newDamage = damage / 2;
|
int newDamage = damage / 2;
|
||||||
|
@ -43,7 +43,7 @@ public class Repair {
|
|||||||
dif = (short) (dif * modify);
|
dif = (short) (dif * modify);
|
||||||
|
|
||||||
PP.addXP(player, SkillType.REPAIR, dif * 10);
|
PP.addXP(player, SkillType.REPAIR, dif * 10);
|
||||||
Skills.XpCheckSkill(SkillType.REPAIR, player);
|
Skills.xpCheckSkill(SkillType.REPAIR, player);
|
||||||
|
|
||||||
//CLANG CLANG
|
//CLANG CLANG
|
||||||
if (mcMMO.p.spoutEnabled) {
|
if (mcMMO.p.spoutEnabled) {
|
||||||
|
@ -161,7 +161,7 @@ public class Skills {
|
|||||||
* @param skillType The skill to update the leaderboards for
|
* @param skillType The skill to update the leaderboards for
|
||||||
* @param player The player whose skill to update
|
* @param player The player whose skill to update
|
||||||
*/
|
*/
|
||||||
public static void ProcessLeaderboardUpdate(SkillType skillType, Player player) {
|
public static void processLeaderboardUpdate(SkillType skillType, Player player) {
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
PlayerProfile PP = Users.getProfile(player);
|
||||||
PlayerStat ps = new PlayerStat();
|
PlayerStat ps = new PlayerStat();
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ public class Skills {
|
|||||||
* @param skillType The skill to check
|
* @param skillType The skill to check
|
||||||
* @param player The player whose skill to check
|
* @param player The player whose skill to check
|
||||||
*/
|
*/
|
||||||
public static void XpCheckSkill(SkillType skillType, Player player) {
|
public static void xpCheckSkill(SkillType skillType, Player player) {
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
PlayerProfile PP = Users.getProfile(player);
|
||||||
int skillups = 0;
|
int skillups = 0;
|
||||||
|
|
||||||
@ -203,8 +203,8 @@ public class Skills {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!Config.getInstance().getUseMySQL()) {
|
if (!Config.getInstance().getUseMySQL()) {
|
||||||
ProcessLeaderboardUpdate(skillType, player);
|
processLeaderboardUpdate(skillType, player);
|
||||||
ProcessLeaderboardUpdate(SkillType.ALL, player);
|
processLeaderboardUpdate(SkillType.ALL, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
String capitalized = Misc.getCapitalized(skillType.toString());
|
String capitalized = Misc.getCapitalized(skillType.toString());
|
||||||
@ -250,14 +250,14 @@ public class Skills {
|
|||||||
*
|
*
|
||||||
* @param player The player to check XP for.
|
* @param player The player to check XP for.
|
||||||
*/
|
*/
|
||||||
public static void XpCheckAll(Player player) {
|
public static void xpCheckAll(Player player) {
|
||||||
for (SkillType x : SkillType.values()) {
|
for (SkillType x : SkillType.values()) {
|
||||||
//Don't want to do anything with this one
|
//Don't want to do anything with this one
|
||||||
if (x == SkillType.ALL) {
|
if (x == SkillType.ALL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
XpCheckSkill(x, player);
|
xpCheckSkill(x, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user