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

@ -5,7 +5,7 @@ import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.gmail.nossr50.datatypes.player.PlayerProfile;
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.player.UserManager;
@ -14,16 +14,16 @@ public class McnotifyCommand implements CommandExecutor {
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
switch (args.length) {
case 0:
PlayerProfile profile = UserManager.getPlayer((Player) sender).getProfile();
McMMOPlayer mcMMOPlayer = UserManager.getPlayer((Player) sender);
if (profile.useChatNotifications()) {
if (mcMMOPlayer.useChatNotifications()) {
sender.sendMessage(LocaleLoader.getString("Commands.Notifications.Off"));
}
else {
sender.sendMessage(LocaleLoader.getString("Commands.Notifications.On"));
}
profile.toggleChatNotifications();
mcMMOPlayer.toggleChatNotifications();
return true;
default: