Closed svew closed 2 years ago
Event.setCursor is deprecated, and is replaced with Player.setItemOnCursor. Another option might be using InventoryView.setCursor, though it appears they have the same functionality.
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryClickEvent.html#setCursor(org.bukkit.inventory.ItemStack)
How much testing have you done against these changes? I'm fairly confident that you will run into issues by just replacing it like you have.
Event.setCursor is deprecated, and is replaced with Player.setItemOnCursor. Another option might be using InventoryView.setCursor, though it appears they have the same functionality.
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryClickEvent.html#setCursor(org.bukkit.inventory.ItemStack)