* This was added as a security measure against unwanted MySQL snooping.
*
* @author Rsl1122
*/
-public class BungeeSetupToggleCommand extends SubCommand {
+public class BungeeSetupToggleCommand extends CommandNode {
public BungeeSetupToggleCommand() {
- super("setup", CommandType.ALL, Permissions.MANAGE.getPermission(), "Toggle Setup mode for Bungee");
+ super("setup", Permissions.MANAGE.getPermission(), CommandType.ALL);
+ setShortHelp("Toggle Setup mode for Bungee");
}
@Override
- public boolean onCommand(ISender sender, String s, String[] strings) {
+ public void onCommand(ISender sender, String s, String[] strings) {
boolean setupAllowed = ConnectionSystem.isSetupAllowed();
ConnectionSystem connectionSystem = ConnectionSystem.getInstance();
@@ -35,6 +36,5 @@ public class BungeeSetupToggleCommand extends SubCommand {
}
String msg = !setupAllowed ? "§aSet-up is now Allowed" : "§cSet-up is now Forbidden";
sender.sendMessage(msg);
- return true;
}
}
\ No newline at end of file
diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/DevCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/DevCommand.java
index 7021b997e..e2355622b 100644
--- a/Plan/src/main/java/com/djrapitops/plan/command/commands/DevCommand.java
+++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/DevCommand.java
@@ -8,25 +8,25 @@ import com.djrapitops.plan.system.info.connection.ConnectionSystem;
import com.djrapitops.plan.system.settings.locale.Locale;
import com.djrapitops.plan.system.settings.locale.Msg;
import com.djrapitops.plan.utilities.Condition;
+import com.djrapitops.plugin.command.CommandNode;
import com.djrapitops.plugin.command.CommandType;
import com.djrapitops.plugin.command.ISender;
-import com.djrapitops.plugin.command.SubCommand;
/**
* Command used for testing functions that are too difficult to unit test.
*
* @author Rsl1122
*/
-public class DevCommand extends SubCommand {
+public class DevCommand extends CommandNode {
public DevCommand() {
super("dev", CommandType.PLAYER_OR_ARGS, "plan.*", "Test Plugin functions not testable with unit tests.", "
@@ -27,27 +29,23 @@ import com.djrapitops.plugin.task.RunnableFactory;
* @author Rsl1122
* @since 3.5.2
*/
-public class RegisterCommand extends SubCommand {
+public class RegisterCommand extends CommandNode {
public RegisterCommand() {
super("register",
CommandType.PLAYER_OR_ARGS,
"", // No Permission Requirement
Locale.get(Msg.CMD_USG_WEB_REGISTER).toString(),
- "