* Fixed NPE in shop.

This commit is contained in:
Steffion 2013-10-05 23:20:06 +02:00
parent e3b9543dec
commit ff7522ad22

View File

@ -57,7 +57,9 @@ public class OnInventoryClickEvent implements Listener {
}
int playerTokens = W.shop.getFile().getInt(
player.getName() + ".tokens");
if (item.getType().equals(Material.AIR))
if (item == null)
return;
if (item.getItemMeta().getDisplayName() == null)
return;
if (item.getItemMeta()
.getDisplayName()