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;
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);
}
}