Package net.glowstone.net.message.play.entity

Examples of net.glowstone.net.message.play.entity.AnimateEntityMessage


public final class AnimateEntityCodec implements Codec<AnimateEntityMessage> {
    @Override
    public AnimateEntityMessage decode(ByteBuf buf) throws IOException {
        int id = ByteBufUtils.readVarInt(buf);
        int animation = buf.readUnsignedByte();
        return new AnimateEntityMessage(id, animation);
    }
View Full Code Here


            // todo: item interactions with air
        }

        if (!EventFactory.callEvent(new PlayerAnimationEvent(player)).isCancelled()) {
            // play the animation to others
            AnimateEntityMessage toSend = new AnimateEntityMessage(player.getEntityId(), AnimateEntityMessage.OUT_SWING_ARM);
            for (GlowPlayer observer : player.getWorld().getRawPlayers()) {
                if (observer != player && observer.canSeeEntity(player)) {
                    observer.getSession().send(toSend);
                }
            }
View Full Code Here

TOP

Related Classes of net.glowstone.net.message.play.entity.AnimateEntityMessage

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.