2011-10-09 21:57:43 +02:00
|
|
|
package com.massivecraft.factions.cmd;
|
2011-04-06 12:04:57 +02:00
|
|
|
|
2011-10-08 22:03:44 +02:00
|
|
|
import com.massivecraft.factions.P;
|
2011-10-09 14:53:38 +02:00
|
|
|
import com.massivecraft.factions.struct.Permission;
|
2011-04-06 12:04:57 +02:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public class CmdBypass extends FCommand {
|
|
|
|
public CmdBypass() {
|
|
|
|
super();
|
|
|
|
this.aliases.add("bypass");
|
|
|
|
|
|
|
|
//this.requiredArgs.add("");
|
|
|
|
this.optionalArgs.put("on/off", "flip");
|
|
|
|
|
|
|
|
this.permission = Permission.BYPASS.node;
|
|
|
|
this.disableOnLock = false;
|
|
|
|
|
|
|
|
senderMustBePlayer = true;
|
|
|
|
senderMustBeMember = false;
|
|
|
|
senderMustBeModerator = false;
|
|
|
|
senderMustBeAdmin = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void perform() {
|
|
|
|
fme.setIsAdminBypassing(this.argAsBool(0, !fme.isAdminBypassing()));
|
|
|
|
|
|
|
|
// TODO: Move this to a transient field in the model??
|
|
|
|
if (fme.isAdminBypassing()) {
|
|
|
|
fme.msg("<i>You have enabled admin bypass mode. You will be able to build or destroy anywhere.");
|
|
|
|
P.p.log(fme.getName() + " has ENABLED admin bypass mode.");
|
2014-07-01 21:49:42 +02:00
|
|
|
}
|
|
|
|
else {
|
2014-04-04 20:55:21 +02:00
|
|
|
fme.msg("<i>You have disabled admin bypass mode.");
|
|
|
|
P.p.log(fme.getName() + " DISABLED admin bypass mode.");
|
|
|
|
}
|
|
|
|
}
|
2011-04-06 12:04:57 +02:00
|
|
|
}
|