Update SpigotCommand (fixed #13492).java #13494
Merged
+17
−17
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.
Shorthend code a little bit and as well added server response in case args[0] isn't equals "reload", but e.g. contains a typo like "relod" (fixed #13492). Simply added check, whether args[0] is equals "reload" to the first "if", where the usage response is included and added a ||, so that there are no issues with wrong arguments as it only checks the second condition if the first condition is wrong, so only if args.length != 1 is wrong, so only if args.length is equals 1. Also shortend code a little bit as the check for args[0].equals("reload") is no longer necessary a second time -> fixed.