[SPIGOT-6480] Players cannot take the book from lecterns that were opened by a plugin Created: 29/May/21 Updated: 29/May/21 Resolved: 29/May/21 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | blablubbabc | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | inventory, lectern |
Version: | This server is running CraftBukkit version dev-Spigot-9fb885e-fd905ab (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT) |
Guidelines Read: | Yes |
Description |
When a plugin opens the inventory of a lectern for a player via
Player#openInventory(lecternBlockState.getInventory()) clicking the button for taking the book has no effect. The cause of this issue is as follows: public boolean a(EntityHuman entityhuman, int i) The regular ContainerLectern reacts to this callback by switching the book pages or taking the book item from the lectern. I will prepare a PR to open the lectern inventory via EntityPlayer#openContainer instead, similar to how vanilla Minecraft does it.
|