mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Simplify isOwner check
This commit is contained in:
parent
d354c626c5
commit
8d76ec549e
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user