mfnalex / ChestSort

Best sorting plugin for Minecraft / Spigot 1.14+
https://www.chestsort.de
GNU General Public License v3.0
91 stars 34 forks source link

middle click not working #138

Closed megolegablock closed 2 years ago

megolegablock commented 2 years ago

Used ChestSort version Tell us your ChestSort version ChestSort (+ API) Version: 12.1.0 - Nov 28, 2021

Used Spigot version Tell us your Spigot version (output of /version). Please also tell us if you use another fork like Paper, etc. Paper 1.18

Describe the bug A clear and concise description of what the bug is. middle click is set to sort chests/inv but does nothing when pressed

To Reproduce How can the behaviour be reproduced? I just enabled middle click with the /chestsort hotkeys but it middle click isn't working to sort chests/inv

Expected behavior A clear and concise description of what you expected to happen. i expect that middle click would work

Additional context Add any other context about the problem here.

mfnalex commented 2 years ago

Hi! Unfortunately, this seems to be caused by Spigot/MC 1.18 itself. I haven't tested it yet but got a few reports about this issue already. It seems like the client simply doesn't send any packets anymore when the clicked slot is empty. I will do some tests soon and report back. Thanks for reporting!

mfnalex commented 2 years ago

Also please stick to the guidelines and post the COMPLETE output of /version

megolegablock commented 2 years ago

sorry forgot to ctr+v

This server is running Paper version git-Paper-20 (MC: 1.18) (Implementing API version 1.18-R0.1-SNAPSHOT) (Git: 0cd411e)

mfnalex commented 2 years ago

Thanks :) Please try whether it also doesn't work with normal Spigot. Paper is still experimental only in 1.18

megolegablock commented 2 years ago

it was working in paper 1.17.1. might be just because of how new 1.18 is?

mfnalex commented 2 years ago

It's either a bug in Paper 1.18, or the vanilla MC client simply doesn't send the "user did pick block" packet anymore when clicking on empty slots. I will check it out tomorrow. But as I said: If it's really a change in the vanilla client, there is NO WAY for me to fix it and you'll simply have to live without the middle click hotkey :/ I'll reply again when I had time to check it out!

megolegablock commented 2 years ago

aight thanks

Machine-Maker commented 2 years ago

In 1.18 pre1 mojang added a check in the client before sending some of the "middle click" packets that the player was in creative mode and has an empty item in their cursor. The middle click sorting works if you middle click while any amount of any item is on your cursor.

megolegablock commented 2 years ago

Aight that's kinda weird. It works if I'm currently holding an item in the menu, but not if my cursor is over an item. Thanks for your help.

mfnalex commented 2 years ago

It is indeed impossible to detect middle-clicking with an empty cursor: https://hub.spigotmc.org/jira/browse/SPIGOT-6835

I will probably change middle-click to some other hotkey, but as said: middle-click is gone and can't be fixed in 1.18 :(