1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-14 18:44:48 +02:00

Null check

This commit is contained in:
snowleo
2011-12-02 03:27:37 +01:00
parent a020e0b9e6
commit bfc90c610a

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)
{