Skip to content

Fix Invalid Equipment Slots in CondIsWearing#7525

Merged
APickledWalrus merged 9 commits into
SkriptLang:dev/patchfrom
Burbulinis:patch/fix-invalid-equipment-slot
Feb 1, 2025
Merged

Fix Invalid Equipment Slots in CondIsWearing#7525
APickledWalrus merged 9 commits into
SkriptLang:dev/patchfrom
Burbulinis:patch/fix-invalid-equipment-slot

Conversation

@Burbulinis
Copy link
Copy Markdown
Member

Description

This PR fixes a missing check whether an entity can use an equipment slot. For example, players cannot use the body equipment slot, causing an exception when using CondIsWearing. This was fixed by filtering the entities that can use the equipment slot inside the stream before calling EntityEquipment#getItem(EquipmentSlot)


Target Minecraft Versions: any
Requirements: none
Related Issues: #7524

@Burbulinis
Copy link
Copy Markdown
Member Author

Burbulinis commented Jan 25, 2025

I wonder how the tests failed after I literally ran them and they succeeded.... Also the canUseEquipmentSlot method doesn't exist for older versions, probably have to manually check 😬

@sovdeeth sovdeeth added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jan 25, 2025
@cheeezburga cheeezburga added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Jan 25, 2025
Comment thread src/main/java/ch/njol/skript/conditions/CondIsWearing.java Outdated
@APickledWalrus APickledWalrus merged commit 5adda36 into SkriptLang:dev/patch Feb 1, 2025
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants