Refactoring + Slight optimization improvements + More advanced /pride command #5
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.
Refactoring
Currently the main file (Hug.java) has over 500 lines! I took it upon myself to organize everything a little bit and put everything in separate packages and files.
Slight optimization improvements
While refactoring I came across at least 4 of these empty if statements with an else statement afterwards:
I rewrote it slightly so now it's just an if statement.
More advanced /pride command
Something that's been on my mind since begin 2022 and the reason I decided to contribute in the first place: Currently /pride only has the option to show the rainbow hearts, which is nice and all, but I'd prefer to also be able to show pride in other colors, such as the ace colors! (black, gray, white, purple).
My rewrite of the plugin takes an argument (with tabcompleter) to select different colors. If the argument isn't in the list or zero arguments are provided it will default to the rainbow flag.