Reformat before I go crazy.

This commit is contained in:
drtshock
2014-04-04 13:55:21 -05:00
parent 0c3ea377dd
commit 814e439705
124 changed files with 11302 additions and 13164 deletions

View File

@@ -3,42 +3,38 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Conf;
import com.massivecraft.factions.struct.Permission;
public class CmdBoom extends FCommand
{
public CmdBoom()
{
super();
this.aliases.add("noboom");
//this.requiredArgs.add("");
this.optionalArgs.put("on/off", "flip");
this.permission = Permission.NO_BOOM.node;
this.disableOnLock = true;
senderMustBePlayer = true;
senderMustBeMember = false;
senderMustBeModerator = true;
senderMustBeAdmin = false;
}
public class CmdBoom extends FCommand {
public CmdBoom() {
super();
this.aliases.add("noboom");
@Override
public void perform()
{
if ( ! myFaction.isPeaceful())
{
fme.msg("<b>This command is only usable by factions which are specially designated as peaceful.");
return;
}
//this.requiredArgs.add("");
this.optionalArgs.put("on/off", "flip");
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
if ( ! payForCommand(Conf.econCostNoBoom, "to toggle explosions", "for toggling explosions")) return;
this.permission = Permission.NO_BOOM.node;
this.disableOnLock = true;
myFaction.setPeacefulExplosionsEnabled(this.argAsBool(0, ! myFaction.getPeacefulExplosionsEnabled()));
senderMustBePlayer = true;
senderMustBeMember = false;
senderMustBeModerator = true;
senderMustBeAdmin = false;
}
String enabled = myFaction.noExplosionsInTerritory() ? "disabled" : "enabled";
@Override
public void perform() {
if (!myFaction.isPeaceful()) {
fme.msg("<b>This command is only usable by factions which are specially designated as peaceful.");
return;
}
// Inform
myFaction.msg("%s<i> has "+enabled+" explosions in your faction's territory.", fme.describeTo(myFaction));
}
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
if (!payForCommand(Conf.econCostNoBoom, "to toggle explosions", "for toggling explosions")) return;
myFaction.setPeacefulExplosionsEnabled(this.argAsBool(0, !myFaction.getPeacefulExplosionsEnabled()));
String enabled = myFaction.noExplosionsInTerritory() ? "disabled" : "enabled";
// Inform
myFaction.msg("%s<i> has " + enabled + " explosions in your faction's territory.", fme.describeTo(myFaction));
}
}