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

Checking a Inventory's title (on a horse's inventory) yeilds IllegalStateException, "Title Not Set"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • 09.05 11:24:50 [Server] Server thread/INFO This server is running CraftBukkit version git-Spigot-1eece4f-6ceffb0 (MC: 1.14) (Implementing API version 1.14-R0.1-SNAPSHOT
    • Yes

       

      Given The Following Code:

      https://hatebin.com/uhrefqhqei

       

      I am trying to look for a inventory with a specific title, for the sake of this bug the title does not matter.    But the above code works for most inventories except for horses.    Horse inventory view's appear to NOT have a title set, and trying to check the title of this inventory throws an IllegalStateException -> Title not set

       

      I have tried using InventoryView.getTitle() != null and !.isEmpty() but get the illegal state exception because the title isn't set.    Request a way to check if the inventory has a title set without throwing the exception.    Perhaps InventoryView.hasTitle() ?

       

            Unassigned Unassigned
            whoolieshop Shane Martin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: