From a2ec404014f3610001f8031ce165b80a1d32cba0 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sat, 11 Jul 2020 13:40:22 +0100 Subject: [PATCH] Fix /plot target nearest --- Core/src/main/java/com/plotsquared/core/command/Target.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Target.java b/Core/src/main/java/com/plotsquared/core/command/Target.java index a70ac3451..d11791538 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Target.java +++ b/Core/src/main/java/com/plotsquared/core/command/Target.java @@ -42,7 +42,7 @@ import com.plotsquared.core.util.StringMan; public class Target extends SubCommand { public Target() { - super(Argument.PlotID); + super(); } @Override public boolean onCommand(PlotPlayer player, String[] args) { @@ -51,6 +51,10 @@ public class Target extends SubCommand { MainUtil.sendMessage(player, Captions.NOT_IN_PLOT_WORLD); return false; } + if (args.length == 0) { + MainUtil.sendMessage(player, this.getUsage()); + return false; + } Plot target = null; if (StringMan.isEqualIgnoreCaseToAny(args[0], "near", "nearest")) { int distance = Integer.MAX_VALUE;