Fix worth display bug

This commit is contained in:
KHobbits 2013-07-14 12:09:49 +01:00
parent 8009c1539a
commit 0d2dea41e3
3 changed files with 11 additions and 8 deletions

View file

@ -147,7 +147,11 @@ public class ItemDb implements IConf, net.ess3.api.IItemDb
{
List<ItemStack> is = new ArrayList<ItemStack>();
if (args[0].equalsIgnoreCase("hand"))
if (args.length < 1)
{
is.add(user.getItemInHand());
}
else if (args[0].equalsIgnoreCase("hand"))
{
is.add(user.getItemInHand());
}
@ -173,14 +177,11 @@ public class ItemDb implements IConf, net.ess3.api.IItemDb
is.add(stack);
}
}
else if (args.length > 0)
else
{
is.add(get(args[0]));
}
else {
is.add(user.getItemInHand());
}
return is;
}