Moved everything that could be moved from PlayerProfile to McMMOPlayer

PlayerProfile now only store stored (flatfile or MySQL) data
This commit is contained in:
bm01
2013-03-03 17:06:05 +01:00
parent f8b4412049
commit c0b7f8a323
24 changed files with 405 additions and 603 deletions

View File

@ -204,9 +204,9 @@ public class Repair {
* @param anvilID The item ID of the anvil block
*/
public static void placedAnvilCheck(Player player, int anvilID) {
PlayerProfile profile = UserManager.getPlayer(player).getProfile();
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
if (!profile.getPlacedAnvil()) {
if (!mcMMOPlayer.getPlacedAnvil()) {
if (mcMMO.spoutEnabled) {
SpoutPlayer spoutPlayer = SpoutManager.getPlayer(player);
@ -219,7 +219,7 @@ public class Repair {
}
player.playSound(player.getLocation(), Sound.ANVIL_LAND, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
profile.togglePlacedAnvil();
mcMMOPlayer.togglePlacedAnvil();
}
}

View File

@ -11,7 +11,7 @@ import org.getspout.spoutapi.player.SpoutPlayer;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.player.PlayerProfile;
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.ItemUtils;
@ -59,9 +59,9 @@ 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 = UserManager.getPlayer(player).getProfile();
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
if (!profile.getPlacedSalvageAnvil()) {
if (!mcMMOPlayer.getPlacedSalvageAnvil()) {
if (mcMMO.spoutEnabled) {
final SpoutPlayer spoutPlayer = SpoutManager.getPlayer(player);
@ -74,7 +74,7 @@ public class Salvage {
}
player.playSound(player.getLocation(), Sound.ANVIL_LAND, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
profile.togglePlacedSalvageAnvil();
mcMMOPlayer.togglePlacedSalvageAnvil();
}
}