Fixed NPE in PermissionCheck pre shop creation

This commit is contained in:
Acrobot 2013-01-29 21:01:46 +01:00
parent a9f9add12a
commit 4ba69135cb

View File

@ -33,8 +33,7 @@ public class PermissionChecker implements Listener {
ItemStack item = MaterialUtil.getItem(itemLine);
if (!Permission.has(player, SHOP_CREATION_ID + Integer.toString(item.getTypeId()))) {
event.setOutcome(NO_PERMISSION);
if (item == null || Permission.has(player, SHOP_CREATION_ID + Integer.toString(item.getTypeId()))) {
return;
}