PlotSquared/Core/src/main/java/com/plotsquared/plot/PlotHandler.java

20 lines
484 B
Java
Raw Normal View History

2020-04-11 02:19:18 +02:00
package com.plotsquared.plot;
2015-03-20 03:13:27 +01:00
2016-04-28 22:38:51 +02:00
import java.util.Set;
2016-01-17 13:19:14 +01:00
import java.util.UUID;
2015-07-30 16:25:16 +02:00
2015-09-13 06:04:31 +02:00
public class PlotHandler {
public static boolean sameOwners(final Plot plot1, final Plot plot2) {
2018-12-27 17:29:35 +01:00
if (plot1.owner == null || plot2.owner == null) {
2015-09-13 06:04:31 +02:00
return false;
}
2016-04-28 22:38:51 +02:00
final Set<UUID> owners = plot1.getOwners();
2016-05-13 00:00:38 +02:00
for (UUID owner : owners) {
if (plot2.isOwner(owner)) {
return true;
}
}
return false;
2015-03-20 03:13:27 +01:00
}
}