From fc5752f8401981ab110b18f0fe8ec88c2b8eab39 Mon Sep 17 00:00:00 2001 From: Tobias Ottenweller Date: Wed, 16 May 2012 22:45:08 +0200 Subject: [PATCH] refactoring of command close --- .../mcteam/ancientgates/commands/CommandClose.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/org/mcteam/ancientgates/commands/CommandClose.java b/src/org/mcteam/ancientgates/commands/CommandClose.java index ca95489..748dfc8 100644 --- a/src/org/mcteam/ancientgates/commands/CommandClose.java +++ b/src/org/mcteam/ancientgates/commands/CommandClose.java @@ -1,30 +1,24 @@ package org.mcteam.ancientgates.commands; -import org.bukkit.command.CommandSender; +import org.mcteam.ancientgates.Plugin; + public class CommandClose extends BaseCommand { public CommandClose() { aliases.add("close"); - requiredParameters.add("id"); - helpDescription = "Close that gate"; + requiredPermission = Plugin.permissionManage; } + @Override public void perform() { gate.setOpen(false); sendMessage("The gate was closed."); } - - - @Override - public boolean hasPermission(CommandSender sender) - { - return sender.hasPermission(permissionManage); - } }