Factions/src/com/massivecraft/factions/cmd/CmdAdmin.java

42 lines
904 B
Java
Raw Normal View History

2011-10-09 21:57:43 +02:00
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.P;
import com.massivecraft.factions.struct.Permission;
public class CmdAdmin extends FCommand
{
public CmdAdmin()
{
super();
this.aliases.add("admin");
//this.requiredArgs.add("");
2011-10-15 19:46:44 +02:00
this.optionalArgs.put("on/off", "flip");
this.permission = Permission.ADMIN.node;
2011-10-09 21:57:43 +02:00
this.disableOnLock = false;
senderMustBePlayer = true;
senderMustBeMember = false;
2011-10-23 17:55:53 +02:00
senderMustBeOfficer = false;
senderMustBeLeader = false;
}
@Override
public void perform()
{
fme.setHasAdminMode(this.argAsBool(0, ! fme.hasAdminMode()));
2011-10-09 18:35:39 +02:00
if ( fme.hasAdminMode())
{
fme.msg("<i>You have enabled admin bypass mode.");
P.p.log(fme.getName() + " has ENABLED admin bypass mode.");
}
else
{
2011-10-10 13:40:24 +02:00
fme.msg("<i>You have disabled admin bypass mode.");
P.p.log(fme.getName() + " DISABLED admin bypass mode.");
}
}
}