Closed rockyhawk64 closed 3 years ago
Hi, it's not a bug, although I admit it's confusing.
ChestSortEvent#getPlayer is @Nullable: https://repo.jeff-media.com/javadocs/ChestSortAPI/de/jeff_media/chestsort/api/ChestSortEvent.html#getPlayer()
The player is only set by ChestSort when a player sorts their own inventory. Is there any need why you need to get the player that triggered sorting? If so I can just add that.
Used ChestSort version Tell us your ChestSort version 11.0.3
Used Spigot version Tell us your Spigot version (output of /version). Please also tell us if you use another fork like Paper, etc. Paper-49
Describe the bug A clear and concise description of what the bug is. This is the developer of CommandPanels. I have updated the plugin to support the new API class location, however I have users who are reporting this error: https://pastebin.com/raw/nKTe9Pqd When sorting a chest e.getPlayer() is always null for the ChestSortEvent.
To Reproduce How can the behaviour be reproduced? By sorting a chest and having a plugin using e.getPlayer()
Expected behavior A clear and concise description of what you expected to happen. NullPointerException
Additional context Add any other context about the problem here.