Skip to content

Treat SkriptPotionEffect as PotionEffect for ClassInfo comparison - #8814

Open
APickledWalrus wants to merge 1 commit into
dev/patchfrom
patch/potion-effect-class-comparison
Open

Treat SkriptPotionEffect as PotionEffect for ClassInfo comparison#8814
APickledWalrus wants to merge 1 commit into
dev/patchfrom
patch/potion-effect-class-comparison

Conversation

@APickledWalrus

Copy link
Copy Markdown
Member

Problem

{_potion} is a potion effect does not currently work when the internal wrapper SkriptPotionEffect is the type.

Solution

Adds a special case to the Object-ClassInfo comparator. This is certainly a bit questionable, but I don't think there are any other great solutions at the moment. It might be worth considering whether the wrapper is really needed, but that would be better fit as a feature change.

Testing Completed

Added an assertion for this case.

Supporting Information


Completes: none (reported on Discord)
Related: none
AI assistance: none

@APickledWalrus
APickledWalrus requested a review from a team as a code owner August 4, 2026 19:57
@APickledWalrus
APickledWalrus removed the request for review from a team August 4, 2026 19:57
@APickledWalrus APickledWalrus added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Aug 4, 2026
@skriptlang-automation skriptlang-automation Bot moved this to In Review in 2.16 Releases Aug 4, 2026
@skriptlang-automation skriptlang-automation Bot added the needs reviews A PR that needs additional reviews label Aug 4, 2026
@skriptlang-automation

This comment has been minimized.

@Absolutionism Absolutionism left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it not be better to allow ClassInfos to handle this instead of hard coding it only for SkriptPotionEffect?
Could benefit any other custom types that wrap a Bukkit object, with said Bukkit object being its own type as well. Especially for addons.

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. needs reviews A PR that needs additional reviews

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants