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);