Closed Griffeng closed 3 months ago
try waiting a tick
Still haven't figured out how to fix this. The objects really are the same though, so it's an issue with Skript. As a workaround, you could try using the following with skript-reflect :
set {_m} to player.getMetadata("vanillaGUI")
if {_m}.isEmpty() is false:
if event.getClickedInventory().equals({_m}.get(0).value()):
This has been an issue up to MC 1.12, hence this function is used for comparison:
function compare(1: inventory, 2: inventory) :: boolean:
return false if (name of {_1}) != (name of {_2})
return false if (rows of {_1}) != (rows of {_2})
return false if type of {_1} != type of {_2}
return true
Skript Version
[18:06:22 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases [18:06:22 INFO]: [Skript] Skript's documentation can be found here: https://skriptlang.github.io/Skript [18:06:22 INFO]: [Skript] Server Version: git-PaperSpigot-445 (MC: 1.8.8) [18:06:22 INFO]: [Skript] Skript Version: 2.6.1 [18:06:22 INFO]: [Skript] Installed Skript Addons: [18:06:22 INFO]: [Skript] - Skellett v1.9.8 (https://forums.skunity.com/resources/skellett.24/) [18:06:22 INFO]: [Skript] - DiSky v2.1 (https://disky.itsthesky.info/) [18:06:22 INFO]: [Skript] - skript-yaml v1.3.2 [18:06:22 INFO]: [Skript] - skDragon v0.16 [18:06:22 INFO]: [Skript] - skUtilities v0.9.2 (https://tim740.github.io/) [18:06:22 INFO]: [Skript] - skript-reflect v2.3 (https://github.com/TPGamesNL/skript-reflect) [18:06:22 INFO]: [Skript] - skRayFall v1.9.20 (https://sk.rayfall.net/) [18:06:22 INFO]: [Skript] - SkriptJSON v1.0.0 [18:06:22 INFO]: [Skript] - SkBee v1.10.2 (https://github.com/ShaneBeee/SkBee) [18:06:22 INFO]: [Skript] Installed dependencies: [18:06:22 INFO]: [Skript] - SQLibrary v7.1 [18:06:22 INFO]: [Skript] - Vault v1.7.2-b107 [18:06:22 INFO]: [Skript] - WorldGuard v6.1
Bug Description
So im using metadata to save the inventory like this:
I then add the slots:
But when i then use the on inventory event to detect a click in the inventory it just dosent work. I can also take things out of the inventory even tho i cancel the event.
Expected Behavior
I should execute the function buff(player).
This works in 2.5 and 2.6 official versions on 1.18
Steps to Reproduce
Make a vanilla inventory
Errors or Screenshots
No errors
Other
No response
Agreement