Simplify isOwner check

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

View File

@ -578,7 +578,14 @@ public class Plot {
return false;
}
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;
}
/**