boolean isSafer = false;
if (regionManager != null) {
BlockVector3 targetPoint = BlockVector3.at(x, y, z);
Set<ProtectedRegion> regions = Objects.requireNonNull(WorldGuard.getInstance().getPlatform().getRegionContainer().get(BukkitAdapter.adapt(world1))).getApplicableRegions(BlockVector3.at(x, y, z).getRegions());
for (ProtectedRegion region : regions) {
Set<String> members = region.getMembers().getPlayers();
Set<String> owners = region.getOwners().getPlayers();
for (String member : members) {
if (Objects.equals(member, player.getName())) {
isSafer = true;
break;
}
}
for (String owner : owners) {
if (Objects.equals(owner, player.getName())) {
isSafer = true;
break;
}
}
}
} else {
isSafer = true;
}