Showing Dropping Anvil Something (Ignore)
This commit is contained in:
@@ -7,42 +7,42 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdPower extends FCommand {
|
||||
|
||||
public CmdPower() {
|
||||
super();
|
||||
this.aliases.add("power");
|
||||
this.aliases.add("pow");
|
||||
this.optionalArgs.put("player name", "you");
|
||||
public CmdPower() {
|
||||
super();
|
||||
this.aliases.add("power");
|
||||
this.aliases.add("pow");
|
||||
this.optionalArgs.put("player name", "you");
|
||||
|
||||
this.requirements = new CommandRequirements.Builder(Permission.POWER)
|
||||
.build();
|
||||
this.requirements = new CommandRequirements.Builder(Permission.POWER)
|
||||
.build();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
FPlayer target = context.argAsBestFPlayerMatch(0, context.fPlayer);
|
||||
if (target == null) {
|
||||
return;
|
||||
}
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
FPlayer target = context.argAsBestFPlayerMatch(0, context.fPlayer);
|
||||
if (target == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (target != context.fPlayer && !Permission.POWER_ANY.has(context.sender, true)) {
|
||||
return;
|
||||
}
|
||||
if (target != context.fPlayer && !Permission.POWER_ANY.has(context.sender, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
|
||||
if (!context.payForCommand(Conf.econCostPower, TL.COMMAND_POWER_TOSHOW, TL.COMMAND_POWER_FORSHOW)) {
|
||||
return;
|
||||
}
|
||||
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
|
||||
if (!context.payForCommand(Conf.econCostPower, TL.COMMAND_POWER_TOSHOW, TL.COMMAND_POWER_FORSHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
double powerBoost = target.getPowerBoost();
|
||||
String boost = (powerBoost == 0.0) ? "" : (powerBoost > 0.0 ? TL.COMMAND_POWER_BONUS.toString() : TL.COMMAND_POWER_PENALTY.toString()) + powerBoost + ")";
|
||||
context.msg(TL.COMMAND_POWER_POWER, target.describeTo(context.fPlayer, true), target.getPowerRounded(), target.getPowerMaxRounded(), boost);
|
||||
}
|
||||
double powerBoost = target.getPowerBoost();
|
||||
String boost = (powerBoost == 0.0) ? "" : (powerBoost > 0.0 ? TL.COMMAND_POWER_BONUS.toString() : TL.COMMAND_POWER_PENALTY.toString()) + powerBoost + ")";
|
||||
context.msg(TL.COMMAND_POWER_POWER, target.describeTo(context.fPlayer, true), target.getPowerRounded(), target.getPowerMaxRounded(), boost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_POWER_DESCRIPTION;
|
||||
}
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_POWER_DESCRIPTION;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user