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

Taking a book from a lectern should call an event

    XMLWordPrintable

Details

    • CraftBukkit version git-Bukkit-d203283 (MC: 1.14)
    • Yes

    Description

      When a player tries to take a book from a lectern an event should be called.

       

      I think the best matching event is the InventoryClickEvent with a new InventoryAction MOVE_TO_OTHER_INVENTORY_OR_DROP - Because unlike other inventory actions this action will drop the stack if there is no free space in the players inventory.

       

      I will create a PR for this.

       

      Attached is an example plugin that does some debug output for the InventoryClickEvent and allows to cancel it. To toggle the cancelling, execute /togglebooktake

      Attachments

        Activity

          People

            Unassigned Unassigned
            Brokkonaut Brokkonaut
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: