mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Fix /plot target nearest
This commit is contained in:
parent
afb72aa102
commit
a2ec404014
@ -42,7 +42,7 @@ import com.plotsquared.core.util.StringMan;
|
|||||||
public class Target extends SubCommand {
|
public class Target extends SubCommand {
|
||||||
|
|
||||||
public Target() {
|
public Target() {
|
||||||
super(Argument.PlotID);
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean onCommand(PlotPlayer<?> player, String[] args) {
|
@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);
|
MainUtil.sendMessage(player, Captions.NOT_IN_PLOT_WORLD);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (args.length == 0) {
|
||||||
|
MainUtil.sendMessage(player, this.getUsage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Plot target = null;
|
Plot target = null;
|
||||||
if (StringMan.isEqualIgnoreCaseToAny(args[0], "near", "nearest")) {
|
if (StringMan.isEqualIgnoreCaseToAny(args[0], "near", "nearest")) {
|
||||||
int distance = Integer.MAX_VALUE;
|
int distance = Integer.MAX_VALUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user