Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class EnableCommand extends Command {
- public EnableCommand() {
- super(
- Commands.CORE_USER_ENABLE_NAME,
- Commands.CORE_USER_ENABLE_DESCRIPTION,
- Commands.CORE_USER_ENABLE_USAGE,
- Commands.CORE_USER_ENABLE_PERMISSION,
- Commands.CORE_USER_ENABLE_ALIASES
- );
- }
- public boolean onExecute(CommandSender p, String[] args) {
- if (args.length < 2) {
- return ChatUtil.sendMessage(p, Messages.USE(this.getUsage()));
- }
- switch (args[0]) {
- case "kit": {
- boolean check = Boolean.parseBoolean(args[1]);
- Settings.ENABLE_KITS = check;
- Settings.saveConfig();
- return ChatUtil.sendMessage(p, "&8» &7Zestawy zostaly &a&l" + (check ? "wlaczone" : "wylaczone") + "&7!");
- }
- case "create": {
- boolean check = Boolean.parseBoolean(args[1]);
- Settings.ENABLE_CREATE = check;
- Settings.saveConfig();
- return ChatUtil.sendMessage(p, "&8» &7Zakladnie gildii zostalo &a&l" + (check ? "wlaczone" : "wylaczone") + "&7!");
- }
- case "tour1": {
- boolean check = Boolean.parseBoolean(args[1]);
- Settings.COST_CREATE_TOUR1_ENABLE = check;
- Settings.saveConfig();
- return ChatUtil.sendMessage(p, "&8» &7Tura pierwsza itemow zostala &a&l" + (check ? "wlaczona" : "wylaczona") + "&7!");
- }
- case "tour2": {
- boolean check = Boolean.parseBoolean(args[1]);
- Settings.COST_CREATE_TOUR2_ENABLE = check;
- Settings.saveConfig();
- return ChatUtil.sendMessage(p, "&8» &7Tura druga itemow zostala &a&l" + (check ? "wlaczona" : "wylaczona") + "&7!");
- }
- default: {
- return ChatUtil.sendMessage(p, Messages.USE(this.getUsage()));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement