Merging branches 1 new mission type
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
@@ -13,27 +13,22 @@ public class CmdBypass extends FCommand {
|
||||
//this.requiredArgs.add("");
|
||||
this.optionalArgs.put("on/off", "flip");
|
||||
|
||||
this.permission = Permission.BYPASS.node;
|
||||
this.disableOnLock = false;
|
||||
|
||||
senderMustBePlayer = true;
|
||||
senderMustBeMember = false;
|
||||
senderMustBeModerator = false;
|
||||
senderMustBeColeader = false;
|
||||
senderMustBeAdmin = false;
|
||||
this.requirements = new CommandRequirements.Builder(Permission.BYPASS)
|
||||
.playerOnly()
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
fme.setIsAdminBypassing(this.argAsBool(0, !fme.isAdminBypassing()));
|
||||
public void perform(CommandContext context) {
|
||||
context.fPlayer.setIsAdminBypassing(context.argAsBool(0, !context.fPlayer.isAdminBypassing()));
|
||||
|
||||
// TODO: Move this to a transient field in the model??
|
||||
if (fme.isAdminBypassing()) {
|
||||
fme.msg(TL.COMMAND_BYPASS_ENABLE.toString());
|
||||
P.p.log(fme.getName() + TL.COMMAND_BYPASS_ENABLELOG.toString());
|
||||
if (context.fPlayer.isAdminBypassing()) {
|
||||
context.fPlayer.msg(TL.COMMAND_BYPASS_ENABLE.toString());
|
||||
FactionsPlugin.getInstance().log(context.fPlayer.getName() + TL.COMMAND_BYPASS_ENABLELOG.toString());
|
||||
} else {
|
||||
fme.msg(TL.COMMAND_BYPASS_DISABLE.toString());
|
||||
P.p.log(fme.getName() + TL.COMMAND_BYPASS_DISABLELOG.toString());
|
||||
context.fPlayer.msg(TL.COMMAND_BYPASS_DISABLE.toString());
|
||||
FactionsPlugin.getInstance().log(context.fPlayer.getName() + TL.COMMAND_BYPASS_DISABLELOG.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,4 +36,4 @@ public class CmdBypass extends FCommand {
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_BYPASS_DESCRIPTION;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user