Fixed ArrayIndexOutOfBounds with mmoedit

This commit is contained in:
nossr50 2012-03-09 02:02:45 -08:00
parent de1539ac1d
commit 577badf4d8

View File

@ -34,8 +34,6 @@ public class MmoeditCommand implements CommandExecutor {
return true;
}
PlayerProfile PPt = Users.getOfflineProfile(args[0]);
if (!(sender instanceof Player))
{
if (args.length < 2)
@ -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!");