Panilla
Panilla copied to clipboard
Inventories are broken with some plugins
We were running latest build from spigomc and we've noticed some of GUIs on our Creative server are broken, after building and printing windowID it seems that in some cases windowID is 0 even tho it's GUI inventory...
if (windowId != 0 && panilla.getPConfig().ignoreNonPlayerInventories)
would it make sense to remove windowId != 0 check?
How are these GUIs created? I'm not sure what causes the window ID to be 0 if it's not a player inventory.
Not sure yet I'm looking into this rn, but just
if (panilla.getPConfig().ignoreNonPlayerInventories)
doesn't fix the issue, even tho check is skipped (so config value is properly read and set to true), however removing Panilla fixes the issue, we've only noticed cause GUI clicks are cancelled (in some cases, holding shift and clicking on GUI would still work for some reason).
Looking at the code I think Inventory inventory = player.getOpenInventory().getTopInventory(); is used, then populated with GUI items etc.
Actually, it seems that
@Override
public void checkPacketPlayInClickContainer(Object _packet) throws NbtNotPermittedException {
if (_packet instanceof PacketPlayInWindowClick) {
if (panilla.getPConfig().ignoreNonPlayerInventories) {
return; // TODO test
}
in public class PacketInspector implements IPacketInspector would fix the issue with GUIs, but I'm not sure about possible other implications...
Edit: That is provided that panilla.getPConfig().ignoreNonPlayerInventories is set to true