Package org.spout.vanilla.component.entity.misc

Examples of org.spout.vanilla.component.entity.misc.Digging


          player.get(Digging.class).stopDigging(new Point(w, x, y, z), false);
        }
        break;
      case PlayerDiggingMessage.STATE_DONE_DIGGING:
        if (!isProtected(player, rm, x, y, z, block, minecraftID)) {
          Digging diggingComponent = player.get(Digging.class);

          if (!diggingComponent.stopDigging(new Point(w, x, y, z), true) || !isInteractable) {
            if (!diggingComponent.isDigging()) {
              session.send(new BlockChangeMessage(block, player.getNetwork().getRepositionManager()));
              Sign sign = block.get(Sign.class);
              if (sign != null) {
                session.send(new SignMessage(block.getX(), block.getY(), block.getZ(), sign.getText(), player.getNetwork().getRepositionManager()));
              }
            }
            return;
          }

          if (player.getData().get(VanillaData.GAMEMODE).equals(GameMode.SURVIVAL)) {
            long diggingTicks = diggingComponent.getDiggingTicks();
            int damageDone;
            int totalDamage;

            if (heldItem == null) {
              damageDone = ((int) diggingTicks);
View Full Code Here

TOP

Related Classes of org.spout.vanilla.component.entity.misc.Digging

Copyright © 2018 www.massapicom. 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.