Showing Dropping Anvil Something (Ignore)
This commit is contained in:
@@ -6,34 +6,34 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdBypass extends FCommand {
|
||||
|
||||
public CmdBypass() {
|
||||
super();
|
||||
this.aliases.add("bypass");
|
||||
public CmdBypass() {
|
||||
super();
|
||||
this.aliases.add("bypass");
|
||||
|
||||
//this.requiredArgs.add("");
|
||||
this.optionalArgs.put("on/off", "flip");
|
||||
//this.requiredArgs.add("");
|
||||
this.optionalArgs.put("on/off", "flip");
|
||||
|
||||
this.requirements = new CommandRequirements.Builder(Permission.BYPASS)
|
||||
.playerOnly()
|
||||
.build();
|
||||
}
|
||||
this.requirements = new CommandRequirements.Builder(Permission.BYPASS)
|
||||
.playerOnly()
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
context.fPlayer.setIsAdminBypassing(context.argAsBool(0, !context.fPlayer.isAdminBypassing()));
|
||||
@Override
|
||||
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 (context.fPlayer.isAdminBypassing()) {
|
||||
context.fPlayer.msg(TL.COMMAND_BYPASS_ENABLE.toString());
|
||||
FactionsPlugin.getInstance().log(context.fPlayer.getName() + TL.COMMAND_BYPASS_ENABLELOG.toString());
|
||||
} else {
|
||||
context.fPlayer.msg(TL.COMMAND_BYPASS_DISABLE.toString());
|
||||
FactionsPlugin.getInstance().log(context.fPlayer.getName() + TL.COMMAND_BYPASS_DISABLELOG.toString());
|
||||
}
|
||||
}
|
||||
// TODO: Move this to a transient field in the model??
|
||||
if (context.fPlayer.isAdminBypassing()) {
|
||||
context.fPlayer.msg(TL.COMMAND_BYPASS_ENABLE.toString());
|
||||
FactionsPlugin.getInstance().log(context.fPlayer.getName() + TL.COMMAND_BYPASS_ENABLELOG.toString());
|
||||
} else {
|
||||
context.fPlayer.msg(TL.COMMAND_BYPASS_DISABLE.toString());
|
||||
FactionsPlugin.getInstance().log(context.fPlayer.getName() + TL.COMMAND_BYPASS_DISABLELOG.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_BYPASS_DESCRIPTION;
|
||||
}
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_BYPASS_DESCRIPTION;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user