On inventory click | number key click type/swap with hotbar/offhand slot issue
LisooYT opened this issue · 1 comments
Skript/Server Version
[19:42:08 INFO]: [Skript] Server Version: 1.20.6-148-20f5165 (MC: 1.20.6)
[19:42:08 INFO]: [Skript] Skript Version: 2.9.5 (skriptlang-github)
[19:42:08 INFO]: [Skript] Installed Skript Addons:
[19:42:08 INFO]: [Skript] - skript-particle v1.3.1 (https://github.com/sovdeeth/skript-particle)
[19:42:08 INFO]: [Skript] - SkQuery v4.1.10
[19:42:08 INFO]: [Skript] - SkBee v3.6.4 (https://github.com/SkriptHub/SkBee)
[19:42:08 INFO]: [Skript] - skript-citizens v1.0.0
[19:42:08 INFO]: [Skript] Installed dependencies:
[19:42:08 INFO]: [Skript] - Vault v1.7.3-b131
[19:42:08 INFO]: [Skript] - WorldGuard v7.0.10+d9424b1
Bug Description
So when i tried to block an item from moving and it cant be just clicked, but after some checking i realised something, when i blocked number key click type (i tried swap with hotbar inventory aciton too) it did kinda work BUT! only if your cursor is aiming at item: for example if you move your cursor at item and then press 1, the item wont move to 1st slot of hotbar, but if you move your cursor to slot 1 and then press the number key (slot) where the item is, it will just move, it wont get cancelled, prob something is wrong with cursor tracking or just these click types dont work.
Expected Behavior
When you for example hold your cursor at offhand slot and then press number key 5 for example cause i have an item here, it should not move and get cancelled.
Steps to Reproduce
on inventory click: send "%click type% %inventory action%" to player if click type is number key: if event-item is stained glass pane named "<##E2F832>ʜᴏʟʏ <##D4F94B>ꜱᴛʀɪᴋᴇ: <##A3A3A3>⭐ ⭐ ⭐" with lore " <##EBFCFF>Qᴜɪᴄᴋʟʏ <##B2DBDC>ʀᴜꜱʜ <##EBFCFF>ꜰᴏʀᴡᴀʀᴅ <##A4E4E6>ᴘɪᴇʀᴄɪɴɢ <##EBFCFF>ᴇɴᴇᴍɪᴇꜱ ɪɴ ꜰʀᴏɴᴛ ᴏꜰ ʏᴏᴜ, ᴅᴇᴀʟɪɴɢ 120%% ᴏꜰ ᴍᴇʟᴇᴇ <##EFBEC3>ᴅᴀᴍᴀɢᴇ <##EBFCFF>ᴛᴏ ᴇɴᴇᴍʏ ᴀɴᴅ <##F7FFD7>ꜱᴛᴜɴɴɪɴɢ <##EBFCFF>ᴛʜᴇᴍ ꜰᴏʀ 1.2ꜱ": cancel event
the send effect messages me that its "number key swap with hotbar", but i tried cancelling both inventory action and click type but it just didnt work
and then have it like this for example:
and now press number key 1 and it will move to the last slot (where cursor is) it also works with offhand slot, when you have it in offhand slot and your cursor is at crafting slot or somewhere and you press F it also places it here
Errors or Screenshots
No response
Other
It also prob works for chests and other inventories for example: you get your cursor to another inventory and have an item in offhand slot, press f and the item goes to the chest even if it shouldnt, it could be a huge issue for smp servers and some mini game servers, as they block items in player's inventories and dont want them to be moved to containers and just like that using your cursor and number keys/offhand slot you can just transport the item
Agreement
- I have read the guidelines above and affirm I am following them with this report.
This is working as intended. Your issue is that you're checking event-item
(the item under the cursor), which is only one of the two items involved in the swap. You can use the hotbar button expression to get the slot it's being swapped with to check that item too. Alternatively, it may be possible to use future event-item
. I'm not sure about that.