Package org.spout.vanilla.event.entity.network

Examples of org.spout.vanilla.event.entity.network.EntityAnimationEvent


            human.setSneaking(false);
          }
        }
        break;
      case EntityActionMessage.ACTION_LEAVE_BED:
        player.getNetwork().callProtocolEvent(new EntityAnimationEvent(player, Animation.LEAVE_BED));
        break;
      case EntityActionMessage.ACTION_START_SPRINTING:
        if (human != null) {
          if (!player.getEngine().getEventManager().callEvent(new PlayerToggleSprintingEvent(player, true)).isCancelled()) {
            human.setSprinting(true);
View Full Code Here


  public void handleServer(ServerSession session, EntityAnimationMessage message) {
    Player player = session.getPlayer();

    switch (message.getAnimation()) {
      case SWING_ARM:
        player.getNetwork().callProtocolEvent(new EntityAnimationEvent(player, org.spout.vanilla.data.Animation.SWING_ARM), true);
        break;
      default:
    }
  }
View Full Code Here

    }
    previousDiggingTime = getDiggingTime();
    isDigging = false;
    getOwner().getNetwork().callProtocolEvent(new BlockBreakAnimationEvent(getOwner(), diggingPosition, (byte) -1));

    getOwner().getNetwork().callProtocolEvent(new EntityAnimationEvent(getOwner(), Animation.NONE));
    return position.equals(diggingPosition);
  }
View Full Code Here

    if (hunger != null) {
      hunger.setExhaustion(hunger.getExhaustion() + 0.3f);
    }

    if (event.getSendMessage()) {
      getOwner().getNetwork().callProtocolEvent(new EntityAnimationEvent(getOwner(), Animation.DAMAGE_ANIMATION));
      getOwner().getNetwork().callProtocolEvent(new EntityStatusEvent(getOwner(), EntityStatusMessage.ENTITY_HURT));
      //getHurtEffect().playGlobal(getParent().getParent().getPosition());
    }
  }
View Full Code Here

  public void wake() {
    sleeping = false;
    skipNight = false;
    occupy(false);
    bed = null;
    player.getNetwork().callProtocolEvent(new EntityAnimationEvent(player, Animation.LEAVE_BED));
  }
View Full Code Here

TOP

Related Classes of org.spout.vanilla.event.entity.network.EntityAnimationEvent

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.