Exclude syntax info's origin from its hash code by UnderscoreTud · Pull Request #8502 · SkriptLang/Skript
Problem
When registering an element without defining its origin, Skript will automatically apply an origin to it pointing to the addon that registered it. That's extremely useful but unfortunately means that the syntax info that Skript registers isn't the same as the one provided by the addon, due to the origin being included in the hash code, thus having different hashes. Which in turn means that, when the addon tries to unregister the same info later on, Skript won't be able to find and unregister it.
Solution
Exclude the origin from the hash, since it's not part of the syntax info's properties. Which also aligns with how the equals method is currently implemented. (origin is excluded)
Testing Completed
Added a test case in SyntaxRegistryTest.java for unregistering elements with different origins
Supporting Information
Completes: none
Related: none
AI assistance: none