mfnalex / ChestSort

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

Item Duplication with BetterGUI &/Or DeluxeMenus #147

Open EricTurner3 opened 2 years ago

EricTurner3 commented 2 years ago

Used ChestSort version 13.0.0

Used Spigot version Tested with latest Spigot 1.18.1 (as of 2/9/22) and also Paper 1.18.1-187 (current)

Other plugin used

Describe the bug Tested with both plugins and both Spigot and Paper. Essentially, if you create a shop/GUI and click an item in the GUI, it will stick to your cursor and add it to your inventory. Image. Disabling ChestSort allows the GUI plugins to act as normal and it prevents you from taking items from the GUI.

To Reproduce Create a menu with either BetterGUI or DeluxeMenus, click one of the items. It will process the command but then the item clicked will pop out of the GUI and stick to your cursor. Closing the GUI adds the item to your inventory allowing duplication.

Expected behavior Prevent the item from duplicating and allow it to just act as a button

mfnalex commented 2 years ago

Please enable ChestSort debug mode (/sort debug), sort one of the inventories and post the console output

EricTurner3 commented 2 years ago

Interestingly after having ChestSort turned off (by adding .off to the end of the file type) and then turning it back on (by removing the .off extension so it works again), I don't seem to be having the issue anymore and the items aren't sticking. I did notice DeluxeMenus is using an NMS hook and its loading before ChestSort, maybe it wasn't before and that was the issue.

Just in case, this is what happens when I open the blacksmith GUI menu that I used in that first post and click one of the items. I also then double-clicked in slot 6 to see if it would do anything, which it didn't.

[17:25:24 INFO]: EricTurner31 issued server command: /blacksmithmenu
[17:25:25 WARN]: [ChestSort] [DEBUG] onChestOpen (InventoryOpenEvent
[17:25:26 WARN]: [ChestSort] [DEBUG]
[17:25:26 WARN]: [ChestSort] [DEBUG] InventoryClickEvent:
[17:25:26 WARN]: [ChestSort] [DEBUG] - Holder: com.extendedclip.deluxemenus.menu.MenuHolder@3b76447c
[17:25:26 WARN]: [ChestSort] [DEBUG] - Holder class: class com.extendedclip.deluxemenus.menu.MenuHolder
[17:25:26 WARN]: [ChestSort] [DEBUG] - Slot: 0
[17:25:26 WARN]: [ChestSort] [DEBUG] - Left-Click: true
[17:25:26 WARN]: [ChestSort] [DEBUG] - Right-Click: false
[17:25:26 WARN]: [ChestSort] [DEBUG] - Shift-Click: false
[17:25:26 WARN]: [ChestSort] [DEBUG]
[17:25:26 INFO]: EricTurner31 issued server command: /repair hand
[17:25:27 WARN]: [ChestSort] [DEBUG]
[17:25:27 WARN]: [ChestSort] [DEBUG] InventoryClickEvent:
[17:25:27 WARN]: [ChestSort] [DEBUG] - Holder: com.extendedclip.deluxemenus.menu.MenuHolder@3b76447c
[17:25:27 WARN]: [ChestSort] [DEBUG] - Holder class: class com.extendedclip.deluxemenus.menu.MenuHolder
[17:25:27 WARN]: [ChestSort] [DEBUG] - Slot: 6
[17:25:27 WARN]: [ChestSort] [DEBUG] - Left-Click: true
[17:25:27 WARN]: [ChestSort] [DEBUG] - Right-Click: false
[17:25:27 WARN]: [ChestSort] [DEBUG] - Shift-Click: false
[17:25:27 WARN]: [ChestSort] [DEBUG]
[17:25:27 WARN]: [ChestSort] [DEBUG]
[17:25:27 WARN]: [ChestSort] [DEBUG] InventoryClickEvent:
[17:25:27 WARN]: [ChestSort] [DEBUG] - Holder: com.extendedclip.deluxemenus.menu.MenuHolder@3b76447c
[17:25:27 WARN]: [ChestSort] [DEBUG] - Holder class: class com.extendedclip.deluxemenus.menu.MenuHolder
[17:25:27 WARN]: [ChestSort] [DEBUG] - Slot: 6
[17:25:27 WARN]: [ChestSort] [DEBUG] - Left-Click: true
[17:25:27 WARN]: [ChestSort] [DEBUG] - Right-Click: false
[17:25:27 WARN]: [ChestSort] [DEBUG] - Shift-Click: false
[17:25:27 WARN]: [ChestSort] [DEBUG]
[17:25:27 WARN]: [ChestSort] [DEBUG]
[17:25:27 WARN]: [ChestSort] [DEBUG] InventoryClickEvent:
[17:25:27 WARN]: [ChestSort] [DEBUG] - Holder: com.extendedclip.deluxemenus.menu.MenuHolder@3b76447c
[17:25:27 WARN]: [ChestSort] [DEBUG] - Holder class: class com.extendedclip.deluxemenus.menu.MenuHolder
[17:25:27 WARN]: [ChestSort] [DEBUG] - Slot: 6
[17:25:27 WARN]: [ChestSort] [DEBUG] - Left-Click: true
[17:25:27 WARN]: [ChestSort] [DEBUG] - Right-Click: false
[17:25:27 WARN]: [ChestSort] [DEBUG] - Shift-Click: false
[17:25:27 WARN]: [ChestSort] [DEBUG]
[17:25:30 WARN]: [ChestSort] [DEBUG] Attempt to automatically sort a player inventory
[17:25:30 WARN]: [ChestSort] [DEBUG] Abort: type != CRAFTING, but CHEST