diff --git a/src/main/java/net/knarcraft/bookswithoutborders/command/CommandUnSign.java b/src/main/java/net/knarcraft/bookswithoutborders/command/CommandUnSign.java index a6936fd..34fb317 100644 --- a/src/main/java/net/knarcraft/bookswithoutborders/command/CommandUnSign.java +++ b/src/main/java/net/knarcraft/bookswithoutborders/command/CommandUnSign.java @@ -50,6 +50,7 @@ public class CommandUnSign implements TabExecutor { public void unSignHeldBook(Player player, boolean mainHand) { //Get the old book BookMeta oldBook = InventoryHelper.getHeldBookMetadata(player, mainHand); + ItemStack heldBook = InventoryHelper.getHeldBook(player, mainHand); //Only allow the owner to un-sign the book if (BooksWithoutBordersConfig.getAuthorOnlyUnsign() && !player.hasPermission("bookswithoutborders.bypassAuthorOnlyUnsign")) { @@ -60,6 +61,7 @@ public class CommandUnSign implements TabExecutor { //UnSign the book ItemStack newBook = new ItemStack(Material.WRITABLE_BOOK); + newBook.setAmount(heldBook.getAmount()); newBook.setItemMeta(oldBook); InventoryHelper.replaceHeldItem(player, newBook, mainHand);