mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-04-02 01:36:25 +02:00
fix: OOB in hasNext of iterator when streaming plots
This commit is contained in:
parent
9c64c2e5fa
commit
670c241d76
@ -44,7 +44,7 @@ interface PlotProvider {
|
|||||||
@Override
|
@Override
|
||||||
public boolean hasNext() {
|
public boolean hasNext() {
|
||||||
if (currentAreaPlots == null || !currentAreaPlots.hasNext()) {
|
if (currentAreaPlots == null || !currentAreaPlots.hasNext()) {
|
||||||
if (areaIndex >= areas.length) {
|
if (areaIndex >= areas.length - 1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
currentAreaPlots = areas[++areaIndex].getPlots().iterator();
|
currentAreaPlots = areas[++areaIndex].getPlots().iterator();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user