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

Written books are not counted correctly

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Invalid
    • None
    • None
    • Windows 8, Minecraft 1.12.2, Spigot 1.12.2. 

    Description

      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:

       

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: