Null check

This commit is contained in:
snowleo 2011-12-02 03:27:37 +01:00
parent 8591023ad5
commit 8d4d8effa0

View file

@ -29,6 +29,10 @@ public class EssentialsBlockListener extends BlockListener
// Do not rely on getItemInHand();
// http://leaky.bukkit.org/issues/663
final ItemStack is = Util.convertBlockToItem(event.getBlockPlaced());
if (is == null)
{
return;
}
boolean unlimitedForUser = user.hasUnlimited(is);
if (unlimitedForUser && user.getGameMode() == GameMode.SURVIVAL)
{