refactoring of command close

This commit is contained in:
Tobias Ottenweller 2012-05-16 22:45:08 +02:00
parent cd42698928
commit fc5752f840

View File

@ -1,30 +1,24 @@
package org.mcteam.ancientgates.commands; package org.mcteam.ancientgates.commands;
import org.bukkit.command.CommandSender; import org.mcteam.ancientgates.Plugin;
public class CommandClose extends BaseCommand public class CommandClose extends BaseCommand
{ {
public CommandClose() public CommandClose()
{ {
aliases.add("close"); aliases.add("close");
requiredParameters.add("id"); requiredParameters.add("id");
helpDescription = "Close that gate"; helpDescription = "Close that gate";
requiredPermission = Plugin.permissionManage;
} }
@Override @Override
public void perform() public void perform()
{ {
gate.setOpen(false); gate.setOpen(false);
sendMessage("The gate was closed."); sendMessage("The gate was closed.");
} }
@Override
public boolean hasPermission(CommandSender sender)
{
return sender.hasPermission(permissionManage);
}
} }