-
-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restoring inventory #6814
Comments
Have you tried without SkQuery? |
Hey, I did. |
can you post the entire error please? |
That's the entire error. |
there should be more lines before and after that |
After looking into some stuff a bit more this is the code that caused the above error, the issue is caused by skript allowing inventory but then proceeding to never add checks for it if (mode == ChangeMode.SET)
return CollectionUtils.array(ItemType[].class, Inventory.class); Skript/src/main/java/ch/njol/skript/classes/data/DefaultChangers.java Lines 224 to 236 in e2928ce
Solution for now would probably be adding inventory support and updating the error message to be more specific and use Tho I don't really know what inventory will do here, they're reference bases and the way he has is code setup would just set it to air again anyways |
So? is it just impossible? |
You should be saving a list of all the items in the player's inventory, rather than a reference to their inventory:
If you want to maintain the slots, you can do that via a loop and using |
Skript/Server Version
Bug Description
Cannot restore inventory
Expected Behavior
After running /mod to turn it off, I should get my inventory back
Steps to Reproduce
Errors or Screenshots
1 error in console: Can't org.bukkit.craftbukkit.v1_20_R3.inventory.CraftInventoryPlayer@772f6f95 to an inventory!
Other
No response
Agreement
The text was updated successfully, but these errors were encountered: