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

@ -94,7 +94,7 @@ public class Repair {
return;
}
int rank = getArcaneForgingRank(Users.getProfile(player));
int rank = getArcaneForgingRank(Users.getPlayer(player).getProfile());
if (rank == 0 || !Permissions.arcaneForging(player)) {
for (Enchantment x : enchants.keySet()) {
@ -231,7 +231,7 @@ public class Repair {
* @return true if bonus granted, false otherwise
*/
public static boolean checkPlayerProcRepair(Player player) {
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.REPAIR);
int skillLevel = Users.getPlayer(player).getProfile().getSkillLevel(SkillType.REPAIR);
int chance = (int) ((SUPER_REPAIR_CHANCE_MAX / SUPER_REPAIR_MAX_BONUS_LEVEL) * skillLevel);
if (skillLevel >= SUPER_REPAIR_MAX_BONUS_LEVEL) chance = (int) SUPER_REPAIR_CHANCE_MAX;
@ -252,7 +252,7 @@ public class Repair {
* @param anvilID The item ID of the anvil block
*/
public static void placedAnvilCheck(Player player, int anvilID) {
PlayerProfile profile = Users.getProfile(player);
PlayerProfile profile = Users.getPlayer(player).getProfile();
if (!profile.getPlacedAnvil()) {
if (mcMMO.spoutEnabled) {

View File

@ -29,8 +29,7 @@ public class Salvage {
}
if (player.getGameMode() == GameMode.SURVIVAL) {
final PlayerProfile profile = Users.getProfile(player);
final int skillLevel = profile.getSkillLevel(SkillType.REPAIR);
final int skillLevel = Users.getPlayer(player).getProfile().getSkillLevel(SkillType.REPAIR);
final int unlockLevel = configInstance.getSalvageUnlockLevel();
if (skillLevel >= unlockLevel) {
@ -64,7 +63,7 @@ public class Salvage {
* @param anvilID The item ID of the anvil block
*/
public static void placedAnvilCheck(final Player player, final int anvilID) {
final PlayerProfile profile = Users.getProfile(player);
final PlayerProfile profile = Users.getPlayer(player).getProfile();
if (!profile.getPlacedSalvageAnvil()) {
if (mcMMO.spoutEnabled) {