mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fix plot home
This commit is contained in:
parent
edc758334c
commit
f1378013c1
@ -94,12 +94,8 @@ import java.util.*;
|
|||||||
C.FOUND_NO_PLOTS.send(player);
|
C.FOUND_NO_PLOTS.send(player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Iterator<Plot> iterator = unsorted.iterator();
|
unsorted = new ArrayList<>(unsorted);
|
||||||
while (iterator.hasNext()) {
|
unsorted.removeIf(plot -> !plot.isBasePlot());
|
||||||
if (!iterator.next().isBasePlot()) {
|
|
||||||
iterator.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (page < 1 || page > unsorted.size()) {
|
if (page < 1 || page > unsorted.size()) {
|
||||||
C.NOT_VALID_NUMBER.send(player, "(1, " + unsorted.size() + ")");
|
C.NOT_VALID_NUMBER.send(player, "(1, " + unsorted.size() + ")");
|
||||||
return;
|
return;
|
||||||
@ -134,19 +130,13 @@ import java.util.*;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
confirm.run(this, new Runnable() {
|
confirm.run(this, () -> {
|
||||||
@Override public void run() {
|
|
||||||
if (plot.teleportPlayer(player)) {
|
if (plot.teleportPlayer(player)) {
|
||||||
whenDone.run(Visit.this, CommandResult.SUCCESS);
|
whenDone.run(Visit.this, CommandResult.SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
whenDone.run(Visit.this, CommandResult.FAILURE);
|
whenDone.run(Visit.this, CommandResult.FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}, () -> whenDone.run(Visit.this, CommandResult.FAILURE));
|
||||||
}, new Runnable() {
|
|
||||||
@Override public void run() {
|
|
||||||
whenDone.run(Visit.this, CommandResult.FAILURE);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user