Skip to content

Commit 1efcc6b

Browse files
Format code with google-java-format (#12)
This commit fixes the style issues introduced in a39f44e according to the output from google-java-format. Details: https://deepsource.io/gh/CyberFlameGO/ServerHelper/transform/4b0d793a-e477-4186-8d62-903058e85096/ Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> Co-authored-by: CyberFlame <cyberflameu@gmail.com>
1 parent 127b0bb commit 1efcc6b

1 file changed

Lines changed: 33 additions & 38 deletions

File tree

src/main/java/net/cyberflame/serverhelper/commands/ServerHelperCommand.java

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,38 @@
66
import org.bukkit.command.CommandSender;
77
import org.jetbrains.annotations.NotNull;
88

9-
public class ServerHelperCommand implements CommandExecutor
10-
{
11-
final String permission = "serverhelper.reload";
9+
public class ServerHelperCommand implements CommandExecutor {
10+
final String permission = "serverhelper.reload";
1211

13-
// TODO: Create a debug "toolchain" which includes config reloading and GC, not limited to players (while
14-
// retaining the current command structure as the primary structure). Ideally a root command with subcommands.
15-
@Override
16-
public boolean onCommand(CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args)
17-
{
18-
if (sender.hasPermission("serverhelper.main"))
19-
{
20-
if (args.length == 0)
21-
{
22-
sender.sendMessage("§aServerHelper is a plugin made for debugging and administration of this " +
23-
"Minecraft server. You can view the source code at " +
24-
"https://github.com/CyberFlameGO/ServerHelper");
25-
if (sender.hasPermission(permission))
26-
{
27-
sender.sendMessage("§eSub-command syntax: §6/serverhelper [subcommand]\n" +
28-
"§3Subcommands: §6reload §7- §2Reloads the plugin configuration.");
29-
}
30-
}
31-
else
32-
{
33-
if (args[0].equals("reload") && sender.hasPermission(permission))
34-
{
35-
ServerHelperPlugin.getInstance().reloadConfig();
36-
sender.sendMessage("§ePlugin configuration has been §2reloaded§c!");
37-
}
38-
else
39-
{
40-
sender.sendMessage("§cUnrecognized parameters. Type §6/serverhelper §cto view the " +
41-
"sub-command syntax and applicable arguments.");
42-
}
43-
}
44-
return true;
45-
}
46-
else return false;
47-
}
12+
// TODO: Create a debug "toolchain" which includes config reloading and GC, not limited to players
13+
// (while
14+
// retaining the current command structure as the primary structure). Ideally a root command with
15+
// subcommands.
16+
@Override
17+
public boolean onCommand(
18+
CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) {
19+
if (sender.hasPermission("serverhelper.main")) {
20+
if (args.length == 0) {
21+
sender.sendMessage(
22+
"§aServerHelper is a plugin made for debugging and administration of this "
23+
+ "Minecraft server. You can view the source code at "
24+
+ "https://github.com/CyberFlameGO/ServerHelper");
25+
if (sender.hasPermission(permission)) {
26+
sender.sendMessage(
27+
"§eSub-command syntax: §6/serverhelper [subcommand]\n"
28+
+ "§3Subcommands: §6reload §7- §2Reloads the plugin configuration.");
29+
}
30+
} else {
31+
if (args[0].equals("reload") && sender.hasPermission(permission)) {
32+
ServerHelperPlugin.getInstance().reloadConfig();
33+
sender.sendMessage("§ePlugin configuration has been §2reloaded§c!");
34+
} else {
35+
sender.sendMessage(
36+
"§cUnrecognized parameters. Type §6/serverhelper §cto view the "
37+
+ "sub-command syntax and applicable arguments.");
38+
}
39+
}
40+
return true;
41+
} else return false;
42+
}
4843
}

0 commit comments

Comments
 (0)