diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 4cc25f2c5f..30f31d1fc4 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()) {