refactoring of command close
This commit is contained in:
parent
cd42698928
commit
fc5752f840
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user