Skript
Skript copied to clipboard
Rewrite Converter System
Description
NOTE: Not marking this as a breaking change as full backwards compatibility remains NOTE: This PR features a lot of changed files. Most of those changes are just imports being different).
Welcome to the second codebase cleanup PR!
In the same manner as https://github.com/SkriptLang/Skript/pull/4931, this PR aims to rewrite and improve Skript's Converter system. Just like that PR, by using stronger generics, better interface declarations, and complete documentation, the system is in a much stronger and better place. I've rewritten this system under the following new package: org.skriptlang.skript.lang.converter
Full list of changes:
- Broke up the Converter classes
- Improved documentation of all Converter classes
- Used clearer generics for easier to read code + stronger type enforcement
- Made it clear that a Converter is a Functional Interface
- Overall enhancements to the Converter search process
- Full backwards compatibility remains with the old classes. They will still work and properly register Converters with the new system, they will just have deprecation warnings.
~~Still in progress as I have some additional things to complete (preliminary reviews are welcome though!)~~ Please feel free to share any enhancements you have in mind!!
Target Minecraft Versions: N/A Requirements: N/A Related Issues:
- https://github.com/SkriptLang/Skript/issues/5045
I don't know if we need a wrapper for old support. It'll be a change that will need to be done for that version.
I don't know if we need a wrapper for old support. It'll be a change that will need to be done for that version.
I mean, the support is there, and I don't think it necessarily holds these changes back (at least, the new system itself doesn't have to do anything special to accommodate the old one)