Closed IllusionTheDev closed 10 months ago
This looks really impressive. It has been a while since I worked on PowerCamera. I'll take time to look over it and test it.
@svenar-nl Have you had the time to look at it yet?
It took some time to look at all changes and getting used to it, but it looks well structured. I have some other changes planned to ease development later on, so I will accept this pull and continue work on it (besides my other plugin PowerRanks).
Hey there, we use this at work. Spent ~90 minutes cleaning this up, here are the steps I took:
Renamed every field, method and class named_like_this to meet java's standard styleguide
Replaced the exposed mutable maps with a facade class, and made a class to encapsule all mutable player data
Reworked the command argument enum slightly to apply predicates instead of manually checking in the main command block
Reworked the command classes to apply guard clauses instead of nested if statements
Fixed a memory leak by removing player data upon player quit (Might still need to cancel any camera tasks)
Command tab completion isn't fully hardcoded anymore, which means you don't need to update your tab completer when adding a new subcommand
A few more changes I have in mind: