uskyblock / uSkyBlock

The best skyblock bukkit plugin around...
http://dev.bukkit.org/bukkit-plugins/uskyblock/
GNU General Public License v3.0
15 stars 12 forks source link

Cursor being reset on menu click #12

Closed BradBouquio closed 3 years ago

BradBouquio commented 3 years ago

I have been using uskyblock for a long time and one of the biggest minor annoyances players have is the cursor location being reset on each click in the menu, especially the challenge menu. It's not game breaking, but I think a fix would be a significant quality of life improvement.

After looking through the code it looks like the cursor reset is occurring as a result of the bukkit method Player.closeInventory(). This method doesn't seem to serve a purpose in cases where a new inventory is opened immediately afterwards, such as line 1049 and 1050 here: https://github.com/uskyblock/uSkyBlock/blob/a5c5f3dbcce4db81d24b243eb816070b2188ab6b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/menu/SkyBlockMenu.java#L1049-L1050

No other major plugin has the cursor being reset after each menu click, which further makes me believe it's not necessary. Hopefully you can take a look when you get a chance. If you don't have time I'd be happy to submit a PR for this. Thanks.

BradBouquio commented 3 years ago

Opened a PR with fix.