Factions/src/com/massivecraft/factions/cmd/CmdAdmin.java
2013-04-09 13:12:13 +02:00

42 lines
914 B
Java

package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
public class CmdAdmin extends FCommand
{
public CmdAdmin()
{
super();
this.aliases.add("admin");
//this.requiredArgs.add("");
this.optionalArgs.put("on/off", "flip");
this.permission = Perm.ADMIN.node;
this.disableOnLock = false;
senderMustBePlayer = true;
senderMustBeMember = false;
senderMustBeOfficer = false;
senderMustBeLeader = false;
}
@Override
public void perform()
{
fme.setHasAdminMode(this.argAsBool(0, ! fme.hasAdminMode()));
if ( fme.hasAdminMode())
{
fme.msg("<i>You have enabled admin bypass mode.");
Factions.get().log(fme.getName() + " has ENABLED admin bypass mode.");
}
else
{
fme.msg("<i>You have disabled admin bypass mode.");
Factions.get().log(fme.getName() + " DISABLED admin bypass mode.");
}
}
}