Replaced playerName fields in PlayerProfile and Users by the Player object

This commit is contained in:
bm01
2012-06-06 01:19:39 +02:00
parent b8be1d1866
commit 56aff1d191
13 changed files with 72 additions and 74 deletions

View File

@ -61,7 +61,7 @@ public class AddxpCommand implements CommandExecutor {
modifiedPlayer.sendMessage(ChatColor.GREEN + "You were awarded " + xp + " experience in " + skillName + "!"); //TODO: Needs more locale.
if (skill.equals(SkillType.ALL)) {
Skills.xpCheckAll(modifiedPlayer);
Skills.xpCheckAll(modifiedPlayer, profile);
}
else {
Skills.xpCheckSkill(skill, modifiedPlayer, profile);
@ -112,7 +112,7 @@ public class AddxpCommand implements CommandExecutor {
modifiedPlayer.sendMessage(ChatColor.GREEN + "You were awarded " + xp + " experience in " + skillName + "!"); //TODO: Needs more locale.
if (skill.equals(SkillType.ALL)) {
Skills.xpCheckAll(modifiedPlayer);
Skills.xpCheckAll(modifiedPlayer, profile);
}
else {
Skills.xpCheckSkill(skill, modifiedPlayer, profile);

View File

@ -98,7 +98,7 @@ public class McremoveCommand implements CommandExecutor {
//Force PlayerProfile stuff to update
Player player = plugin.getServer().getPlayer(playerName);
if (player != null && Users.players.containsKey(playerName.toLowerCase())) {
if (player != null && Users.getProfiles().containsKey(player)) {
Users.removeUser(player);
Users.addUser(player);
}