Simplify isOwner check

This commit is contained in:
SirYwell 2022-12-21 16:08:09 +01:00
parent 25defaac07
commit c9d210bd64
No known key found for this signature in database

View File

@ -578,7 +578,14 @@ public class Plot {
return false; return false;
} }
final Set<Plot> connected = getConnectedPlots(); final Set<Plot> connected = getConnectedPlots();
return connected.stream().anyMatch(current -> uuid.equals(current.getOwner())); for (Plot current : connected) {
// can skip ServerPlotFlag check in getOwner()
// as flags are synchronized between plots
if (uuid.equals(current.getOwnerAbs())) {
return true;
}
}
return false;
} }
/** /**