Showing Dropping Anvil Something (Ignore)

This commit is contained in:
Driftay
2019-09-15 05:19:06 -04:00
parent 2feaed0aad
commit 7f988031ca
285 changed files with 28757 additions and 28757 deletions

View File

@@ -7,40 +7,40 @@ import com.massivecraft.factions.zcore.util.TL;
public class CmdDelFWarp extends FCommand {
public CmdDelFWarp() {
super();
this.aliases.add("delwarp");
this.aliases.add("dw");
this.aliases.add("deletewarp");
this.requiredArgs.add("warp name");
public CmdDelFWarp() {
super();
this.aliases.add("delwarp");
this.aliases.add("dw");
this.aliases.add("deletewarp");
this.requiredArgs.add("warp name");
this.requirements = new CommandRequirements.Builder(Permission.SETWARP)
.playerOnly()
.memberOnly()
.build();
}
this.requirements = new CommandRequirements.Builder(Permission.SETWARP)
.playerOnly()
.memberOnly()
.build();
}
@Override
public void perform(CommandContext context) {
String warp = context.argAsString(0);
if (context.faction.isWarp(warp)) {
if (!transact(context.fPlayer, context)) {
return;
}
context.faction.removeWarp(warp);
context.msg(TL.COMMAND_DELFWARP_DELETED, warp);
} else {
context.msg(TL.COMMAND_DELFWARP_INVALID, warp);
}
}
@Override
public void perform(CommandContext context) {
String warp = context.argAsString(0);
if (context.faction.isWarp(warp)) {
if (!transact(context.fPlayer, context)) {
return;
}
context.faction.removeWarp(warp);
context.msg(TL.COMMAND_DELFWARP_DELETED, warp);
} else {
context.msg(TL.COMMAND_DELFWARP_INVALID, warp);
}
}
private boolean transact(FPlayer player, CommandContext context) {
return !FactionsPlugin.getInstance().getConfig().getBoolean("warp-cost.enabled", false) || player.isAdminBypassing() || context.payForCommand(FactionsPlugin.getInstance().getConfig().getDouble("warp-cost.delwarp", 5), TL.COMMAND_DELFWARP_TODELETE.toString(), TL.COMMAND_DELFWARP_FORDELETE.toString());
}
private boolean transact(FPlayer player, CommandContext context) {
return !FactionsPlugin.getInstance().getConfig().getBoolean("warp-cost.enabled", false) || player.isAdminBypassing() || context.payForCommand(FactionsPlugin.getInstance().getConfig().getDouble("warp-cost.delwarp", 5), TL.COMMAND_DELFWARP_TODELETE.toString(), TL.COMMAND_DELFWARP_FORDELETE.toString());
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_DELFWARP_DESCRIPTION;
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_DELFWARP_DESCRIPTION;
}
}