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