-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pvp utils improvement #69
Pvp utils improvement #69
Conversation
I cannot really proceed until someone approved it. Unless we see the current situation as an exception and don't require a PR review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than some formatting issues and questionable designing (Mostly, the use of this
and curly brackets is inconsistent), it's good
@@ -28,13 +28,14 @@ public boolean canCommandSenderUseCommand (ICommandSender sender) | |||
public void processCommand (ICommandSender sender, String[] args) | |||
{ | |||
EntityPlayerMP player = getCommandSenderAsPlayer (sender); | |||
EnumPvPMode currentMode = PvPUtils.getPvPMode (player); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add this here and not check the mode in cancelPvPTimer
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because firstly I used it in the other function too but then I left the function as it was. It could also be moved to the function you've mentioned, but at least I like it to have "metadata" like this in a higher level because they could be used in future "child functions". But it's not that important, I think.
Also, I'm aware of the formatting issues. But I think it's the best to apply our formatting (and hopefully cleanup, see #64) guidelines once when we prepare a new release (or pre-release), because otherwise every commit is polluted with formattings, which makes the PRs hard to review. |
The "this calls" were actually a leftover from my old cleanup template. |
But this is why I'm strongly for reviews of the PR's. Two or three pairs of eyes see more than one. |
Closes #41. I didn't add utilities for the logging messages because they're not reused through the code.