private boolean isProtected(Player player, RepositionManager rm, int x, int y, int z, Block block, short minecraftID) {
final Point point = new Point(block.getWorld(), x, y, z);
Collection<Protection> protections = player.getEngine().getServiceManager().getRegistration(ProtectionService.class).getProvider().getAllProtections(point);
for (Protection p : protections) {
if (p.contains(point) && !player.get(Human.class).isOp()) {
player.getNetwork().getSession().send(new BlockChangeMessage(x, y, z, minecraftID, block.getBlockData() & 0xF, rm));
player.sendMessage(ChatStyle.DARK_RED + "This area is a protected spawn point!");
return true;
}
}
return false;