Wrote a disable command on bungee #594

This commit is contained in:
Rsl1122 2018-07-12 19:45:29 +03:00
parent 8788cf2d01
commit 9369a863b2
2 changed files with 23 additions and 0 deletions

View File

@ -48,6 +48,7 @@ public class PlanBungeeCommand extends TreeCmdNode {
new ManageConDebugCommand(),
new BungeeSetupToggleCommand(),
new ReloadCommand(plugin),
new DisableCommand(),
new StatusCommand<>(plugin, Permissions.MANAGE.getPermission(), plugin.getColorScheme()),
// (Settings.ALLOW_UPDATE.isTrue() ? new UpdateCommand() : null)
}

View File

@ -0,0 +1,22 @@
package com.djrapitops.plan.command.commands;
import com.djrapitops.plan.PlanPlugin;
import com.djrapitops.plugin.command.CommandNode;
import com.djrapitops.plugin.command.CommandType;
import com.djrapitops.plugin.command.ISender;
public class DisableCommand extends CommandNode {
public DisableCommand() {
super("disable", "plan.reload", CommandType.ALL);
}
@Override
public void onCommand(ISender sender, String commandLabel, String[] args) {
PlanPlugin.getInstance().onDisable();
sender.sendMessage(
"§aPlan systems are now disabled. " +
"You can still use /planbungee reload to restart the plugin."
);
}
}