mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-14 18:44:48 +02:00
Null check
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user