mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Simplify isOwner check
This commit is contained in:
parent
25defaac07
commit
c9d210bd64
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user