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

InventoryCloseEvent event.getView().getTitle() throwing Preconditions exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • git-Spigot-6dbf995-364b6fb (MC: 1.14 Pre-Release 5) (Implementing API version 1.14-pre5-SNAPSHOT)
    • Yes

      Calling Player#closeInventory when the player does not have an open inventory will cause an InventoryCloseEvent to be fired that throws a Preconditions state check of "Title not set" when InventoryView#getTitle] is called.

      Attached is a simple plugin that calls event.getPlayer().closeInventory() whenever a player sneaks, for example. Not useful at all but demonstrates the problem.

      Source: https://pastebin.com/Sn4seipk

      Exception: https://pastebin.com/WEZE2LzQ

            Unassigned Unassigned
            Esophose Esophose
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: