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

Ability for plugins to open the beacon view for an existing beacon block

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • This server is running CraftBukkit version dev-Spigot-9fb885e-fd905ab (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
    • Yes

      Currently, there doesn't seem to be a way for plugins to open the beacon view for an existing beacon block in the world.

      The beacon BlockState does not provide a getInventory() method like other types of blocks that have an inventory. This is probably because the beacon inventory is kind of special: It only exists while a player is viewing it. Any temporarily stored item is either converted to beacon levels by the player, or dropped once the player closes the inventory.

      Options could be:

      • Have the Beacon BlockState return some kind of dummy beacon inventory that can be used to open the beacon view for a player via openInventory(inventory). Since the item stored by this inventory would not be persisted, an option could be for it to either restrict or ignore attempts to store items in it. Or have the item silently vanish once this dummy inventory object is GC'ed.
      • Provide some kind of special method to open the beacon view for a player, similar to the existing HumanEntity#openEnchanting andHumanEntity#openWorkbench methods.

            Unassigned Unassigned
            blablubbabc blablubbabc
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: