From 577badf4d8fbb48fce63a6ad9842f44aac6534ed Mon Sep 17 00:00:00 2001 From: nossr50 Date: Fri, 9 Mar 2012 02:02:45 -0800 Subject: [PATCH] Fixed ArrayIndexOutOfBounds with mmoedit --- .../com/gmail/nossr50/commands/general/MmoeditCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 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 5ec8a52e3..5d063f0db 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/MmoeditCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/general/MmoeditCommand.java @@ -33,8 +33,6 @@ public class MmoeditCommand implements CommandExecutor { sender.sendMessage("This command requires permissions."); return true; } - - PlayerProfile PPt = Users.getOfflineProfile(args[0]); if (!(sender instanceof Player)) { @@ -44,6 +42,7 @@ public class MmoeditCommand implements CommandExecutor { return true; } else if (args.length == 3) { + PlayerProfile PPt = Users.getOfflineProfile(args[0]); if(!PPt.isLoaded()) { sender.sendMessage("Player does not exist in the database!"); @@ -77,6 +76,7 @@ public class MmoeditCommand implements CommandExecutor { } if (args.length == 3) { + PlayerProfile PPt = Users.getOfflineProfile(args[0]); if(!PPt.isLoaded()) { sender.sendMessage("Player does not exist in the database!");