mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16: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);
|
||||
return;
|
||||
}
|
||||
Iterator<Plot> iterator = unsorted.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
if (!iterator.next().isBasePlot()) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
unsorted = new ArrayList<>(unsorted);
|
||||
unsorted.removeIf(plot -> !plot.isBasePlot());
|
||||
if (page < 1 || page > unsorted.size()) {
|
||||
C.NOT_VALID_NUMBER.send(player, "(1, " + unsorted.size() + ")");
|
||||
return;
|
||||
@ -134,19 +130,13 @@ import java.util.*;
|
||||
return;
|
||||
}
|
||||
}
|
||||
confirm.run(this, new Runnable() {
|
||||
@Override public void run() {
|
||||
confirm.run(this, () -> {
|
||||
if (plot.teleportPlayer(player)) {
|
||||
whenDone.run(Visit.this, CommandResult.SUCCESS);
|
||||
} else {
|
||||
whenDone.run(Visit.this, CommandResult.FAILURE);
|
||||
}
|
||||
}
|
||||
}, new Runnable() {
|
||||
@Override public void run() {
|
||||
whenDone.run(Visit.this, CommandResult.FAILURE);
|
||||
}
|
||||
});
|
||||
}, () -> whenDone.run(Visit.this, CommandResult.FAILURE));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user