Get rid of all the deprecated instances of Users.getProfile()

This commit is contained in:
GJ
2013-02-04 08:09:24 -05:00
parent 74c367c069
commit 44b862c0bb
19 changed files with 34 additions and 35 deletions

View File

@ -153,7 +153,7 @@ public class Herbalism {
return;
}
PlayerProfile profile = Users.getProfile(player);
PlayerProfile profile = mcMMOPlayer.getProfile();
int herbLevel = profile.getSkillLevel(SkillType.HERBALISM);
Material blockType = block.getType();
@ -224,7 +224,7 @@ public class Herbalism {
* @param plugin mcMMO plugin instance
*/
private static void greenThumbWheat(Block block, Player player, BlockBreakEvent event, mcMMO plugin) {
PlayerProfile profile = Users.getProfile(player);
PlayerProfile profile = Users.getPlayer(player).getProfile();
int herbLevel = profile.getSkillLevel(SkillType.HERBALISM);
PlayerInventory inventory = player.getInventory();
boolean hasSeeds = false;
@ -320,7 +320,7 @@ public class Herbalism {
* @param block The block being used in the ability
*/
public static void greenThumbBlocks(ItemStack is, Player player, Block block) {
PlayerProfile profile = Users.getProfile(player);
PlayerProfile profile = Users.getPlayer(player).getProfile();
int skillLevel = profile.getSkillLevel(SkillType.HERBALISM);
int seeds = is.getAmount();
@ -340,7 +340,7 @@ public class Herbalism {
}
public static void hylianLuck(Block block, Player player, BlockBreakEvent event) {
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.HERBALISM);
int skillLevel = Users.getPlayer(player).getProfile().getSkillLevel(SkillType.HERBALISM);
double chance = (hylianLuckMaxChance / hylianLuckMaxLevel) * Misc.skillCheck(skillLevel, hylianLuckMaxLevel);
int activationChance = Misc.calculateActivationChance(Permissions.luckyHerbalism(player));