diff options
author | Des Herriott <des.herriott@gmail.com> | 2014-02-27 12:32:21 +0000 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2014-04-18 12:30:53 -0500 |
commit | 8a6ed3a88b8cd8c08320157b605a63f56e9c4c88 (patch) | |
tree | ba413e7dab436c6144944dc4fe9d05177d6f59ef | |
parent | a86bc7aeb394df65521555f1b73357c68503cbc5 (diff) | |
download | craftbukkit-8a6ed3a88b8cd8c08320157b605a63f56e9c4c88.tar craftbukkit-8a6ed3a88b8cd8c08320157b605a63f56e9c4c88.tar.gz craftbukkit-8a6ed3a88b8cd8c08320157b605a63f56e9c4c88.tar.lz craftbukkit-8a6ed3a88b8cd8c08320157b605a63f56e9c4c88.tar.xz craftbukkit-8a6ed3a88b8cd8c08320157b605a63f56e9c4c88.zip |
Check that item in hand is not null after book event. Fixes BUKKIT-5443
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 4cc25f2c..30f31d1f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -709,7 +709,7 @@ public class CraftEventFactory { ItemStack itemInHand = player.inventory.getItem(itemInHandIndex); // If they've got the same item in their hand, it'll need to be updated. - if (itemInHand.getItem() == Items.BOOK_AND_QUILL) { + if (itemInHand != null && itemInHand.getItem() == Items.BOOK_AND_QUILL) { if (!editBookEvent.isCancelled()) { CraftItemStack.setItemMeta(itemInHand, editBookEvent.getNewBookMeta()); if (editBookEvent.isSigning()) { |