GC-spigot / AdvancedEnchantments

Superior Custom Enchantments Creator for Minecraft And Spigot platform
138 stars 61 forks source link

NullPointerException in InventoryClickEvent in AdvancedEnchantments v9.8.9 #4355

Closed DimaSergeew closed 2 weeks ago

DimaSergeew commented 3 weeks ago

Describe the bug

A NullPointerException occurs when handling the InventoryClickEvent in the AdvancedEnchantments plugin. The error is triggered because getCurrentItem() returns null, and the code does not handle this case before attempting to call the clone() method on the returned value. Error Stack Trace: https://mclo.gs/ZMPm8ET FullLogs: https://mclo.gs/LpSGJy0

How to reproduce

Install the AdvancedEnchantments plugin v9.8.9 on a Purpur 1.20.4 server. Trigger an InventoryClickEvent by interacting with an inventory in the game. Observe the server console for the NullPointerException error. My server version: purpur 1.20.4 lastet builds

Screenshots / Videos

No response

"/ae plinfo" link

https://paste.md-5.net/jucuyatofa

Server Log

No response

ThomasWega commented 2 weeks ago

Will be fixed in the next update