From 37024950382f13941b209d4b0a713832d7a31fee Mon Sep 17 00:00:00 2001 From: bm01 Date: Sat, 7 Jul 2012 20:02:54 +0200 Subject: [PATCH] Don't need to .save() for online players --- .../com/gmail/nossr50/commands/general/MmoeditCommand.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/commands/general/MmoeditCommand.java b/src/main/java/com/gmail/nossr50/commands/general/MmoeditCommand.java index 6950efbdd..c7c88d168 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/MmoeditCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/general/MmoeditCommand.java @@ -88,6 +88,7 @@ public class MmoeditCommand implements CommandExecutor { if (mcmmoPlayer != null) { profile = mcmmoPlayer.getProfile(); + profile.modifySkill(skill, newValue); mcmmoPlayer.getPlayer().sendMessage(ChatColor.GREEN + "Your level in " + skillName + " was set to " + newValue + "!"); //TODO: Needs more locale. sender.sendMessage(ChatColor.RED + skillName + " has been modified for " + args[0] + "."); //TODO: Use locale } @@ -98,10 +99,9 @@ public class MmoeditCommand implements CommandExecutor { sender.sendMessage(LocaleLoader.getString("Commands.DoesNotExist")); return true; } - } - profile.modifySkill(skill, newValue); - profile.save(); + profile.save(); + } return true; default: