diff options
author | snowleo <schneeleo@gmail.com> | 2011-12-02 03:27:37 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-12-02 03:27:37 +0100 |
commit | 8d4d8effa0c6684b62aa6060646c837cd39b62f1 (patch) | |
tree | ecef5ff7a239d701d2390136194f7c5ebb9ef7b5 | |
parent | 8591023ad5e50e132dc0dc9e473d74303630783c (diff) | |
download | Essentials-8d4d8effa0c6684b62aa6060646c837cd39b62f1.tar Essentials-8d4d8effa0c6684b62aa6060646c837cd39b62f1.tar.gz Essentials-8d4d8effa0c6684b62aa6060646c837cd39b62f1.tar.lz Essentials-8d4d8effa0c6684b62aa6060646c837cd39b62f1.tar.xz Essentials-8d4d8effa0c6684b62aa6060646c837cd39b62f1.zip |
Null check
-rw-r--r-- | Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java index b5182b11b..ceda6a60c 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java @@ -29,13 +29,17 @@ 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) { ess.scheduleSyncDelayedTask( new Runnable() { - @Override + @Override public void run() { user.getInventory().addItem(is); |