Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-3640

Written books are not counted correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Minor Minor
    • None
    • None
    • Windows 8, Minecraft 1.12.2, Spigot 1.12.2. 

      My plugin uses Inventory.containsAtLeast() to check whether a player has certain items. Generally, it works fine, but for written books it does not. In-game I create a book and sign it and then test to make sure that containsAtLeast() gets it, but it does not.

      I think the issue is that a 'real' written book has metadata that should not be checked. Perhaps Itemstack_.isSimilar()_ should check this? 

      The figure below shows my findings:

       

       

            Unassigned Unassigned
            Staartvin Vincent Bolta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: