Skip to content

Plugin does not check if the clicked inventory is the actual GUI #19

@MCreeper12731

Description

@MCreeper12731

There is a known issue in Spigot when checking the inventory's clicked slot number because of the slot numbering system (picture included)
image
I fixed this issue by adding an additional fix
if (event.getClickedInventory() == null || event.getClickedInventory().getType() == InventoryType.PLAYER) return;
which checks if the inventory that was clicked was actually the upper part of the UI, otherwise the listener also let's through clicks that were done in the player inventory and act as if they were done in the GUI. But adding this everytime is a bit tedious. Sorry if the explanation is a bit confusing, I can go over certain parts again if you don't understand the problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions