Because PP is an awful variable name.

This commit is contained in:
GJ
2012-07-03 10:04:04 -04:00
parent 96e70aa4d2
commit caf9c07ba3
29 changed files with 214 additions and 214 deletions

View File

@ -9,15 +9,15 @@ import com.gmail.nossr50.util.Skills;
public class GainXp implements Runnable {
private Player player = null;
private PlayerProfile PP = null;
private PlayerProfile profile = null;
private double baseXp = 0;
private SkillType skillType = null;
private LivingEntity target = null;
private int baseHealth = 0;
public GainXp(Player player, PlayerProfile PP, SkillType skillType, double baseXp, LivingEntity target) {
public GainXp(Player player, PlayerProfile profile, SkillType skillType, double baseXp, LivingEntity target) {
this.player = player;
this.PP = PP;
this.profile = profile;
this.skillType = skillType;
this.baseXp = baseXp;
this.target = target;
@ -39,6 +39,6 @@ public class GainXp implements Runnable {
damage += health;
}
Skills.xpProcessing(player, PP, skillType, (int) (damage * baseXp));
Skills.xpProcessing(player, profile, skillType, (int) (damage * baseXp));
}
}

View File

@ -10,11 +10,11 @@ import com.gmail.nossr50.datatypes.SkillType;
public class GreenThumbTimer implements Runnable {
private Block block;
private PlayerProfile PP;
private PlayerProfile profile;
public GreenThumbTimer(Block block, PlayerProfile PP) {
public GreenThumbTimer(Block block, PlayerProfile profile) {
this.block = block;
this.PP = PP;
this.profile = profile;
}
@Override
@ -22,14 +22,14 @@ public class GreenThumbTimer implements Runnable {
block.setType(Material.CROPS);
//This replants the wheat at a certain stage in development based on Herbalism Skill
if (!PP.getAbilityMode(AbilityType.GREEN_TERRA)) {
if (PP.getSkillLevel(SkillType.HERBALISM) >= 600) {
if (!profile.getAbilityMode(AbilityType.GREEN_TERRA)) {
if (profile.getSkillLevel(SkillType.HERBALISM) >= 600) {
block.setData(CropState.MEDIUM.getData());
}
else if (PP.getSkillLevel(SkillType.HERBALISM) >= 400) {
else if (profile.getSkillLevel(SkillType.HERBALISM) >= 400) {
block.setData(CropState.SMALL.getData());
}
else if (PP.getSkillLevel(SkillType.HERBALISM) >= 200) {
else if (profile.getSkillLevel(SkillType.HERBALISM) >= 200) {
block.setData(CropState.VERY_SMALL.getData());
}
else {

View File

@ -22,14 +22,14 @@ public class SkillMonitor implements Runnable {
for (Player player : plugin.getServer().getOnlinePlayers()) {
PlayerProfile PP = Users.getProfile(player);
PlayerProfile profile = Users.getProfile(player);
/*
* MONITOR SKILLS
*/
for (SkillType skill : SkillType.values()) {
if (skill.getTool() != null && skill.getAbility() != null) {
Skills.monitorSkill(player, PP, curTime, skill);
Skills.monitorSkill(player, profile, curTime, skill);
}
}
@ -38,7 +38,7 @@ public class SkillMonitor implements Runnable {
*/
for (AbilityType ability : AbilityType.values()) {
if (ability.getCooldown() > 0 ) {
Skills.watchCooldown(player, PP, ability);
Skills.watchCooldown(player, profile, ability);
}
}
}