Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The current way the /sk command is written makes it nearly impossible to add new features, fix bugs, or even tell what's going on.
There are also lots of issues created for the /sk command that were untouched for a long time.
Solution
Deletes the old SkriptCommand and SkriptCommandTabCompleter classes and replaces them with a new SubCommand class.
To add a new SubCommand, you create a new class for your command and extend SubCommand:
Then, add your subcommand inside the new SkriptCommand class
For commands that share a lot of code, such as
/sk enable | disable | reload
, a new ScriptCommand class was added as a utility class.This approach makes it way easier to work on anything related to the /sk command.
TODO List
/sk reload
)/sk enable
(Ignore first hyphen in /skript enable #7666)skript command.help.show
(Missingskript command.help.show
#7606)I created this PR early to get initial feedback on the new structure, and so that people can recommend changes on the old command code. If you have any suggestions for new commands, drop them here.
Completes: none
Related: none