From 2412931122b3d30b1ea83db21c953d25944f96c1 Mon Sep 17 00:00:00 2001 From: Driftay Date: Sat, 18 Jan 2020 02:20:11 -0500 Subject: [PATCH] Reformat again --- .../massivecraft/factions/cmd/tnt/CmdTntFill.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTntFill.java b/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTntFill.java index 9562bffc..61f19836 100644 --- a/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTntFill.java +++ b/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTntFill.java @@ -40,8 +40,8 @@ public class CmdTntFill extends FCommand { @Override public void perform(CommandContext context) { - if (!FactionsPlugin.getInstance().getConfig().getBoolean("Tntfill.enabled")) { - context.msg(TL.GENERIC_DISABLED); + if (!FactionsPlugin.instance.getConfig().getBoolean("Tntfill.enabled")) { + context.msg(TL.COMMAND_TNT_DISABLED_MSG); return; } @@ -55,14 +55,14 @@ public class CmdTntFill extends FCommand { } context.msg(TL.COMMAND_TNTFILL_HEADER); - // We don't know the max yet, so let's not assume. - int radius = context.argAsInt(0, 0); - int amount = context.argAsInt(1, 0); + int radius = context.argAsInt(0, 0); // We don't know the max yet, so let's not assume. + int amount = context.argAsInt(1, 0); // We don't know the max yet, so let's not assume. - if (amount < 0) { + if (amount <= 0 || radius <= 0) { context.msg(TL.COMMAND_TNT_POSITIVE); return; } + if (radius > FactionsPlugin.getInstance().getConfig().getInt("Tntfill.max-radius")) { context.msg(TL.COMMAND_TNTFILL_RADIUSMAX.toString().replace("{max}", FactionsPlugin.getInstance().getConfig().getInt("Tntfill.max-radius") + "")); return;