Examples of BlockChangeMessage


Examples of org.spout.vanilla.protocol.msg.world.block.BlockChangeMessage

  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;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.