Examples of PositionRotationMessage


Examples of net.glowstone.net.message.play.game.PositionRotationMessage

        double z = buffer.readDouble();
        float rotation = buffer.readFloat();
        float pitch = buffer.readFloat();
        int flags = buffer.readUnsignedByte();

        return new PositionRotationMessage(x, y, z, rotation, pitch, flags);
    }
View Full Code Here

Examples of net.glowstone.net.message.play.game.PositionRotationMessage

        // call move event if movement actually occurred and there are handlers registered
        if (!oldLocation.equals(newLocation) && PlayerMoveEvent.getHandlerList().getRegisteredListeners().length > 0) {
            final PlayerMoveEvent event = EventFactory.callEvent(new PlayerMoveEvent(session.getPlayer(), oldLocation, newLocation));
            if (event.isCancelled()) {
                // tell client they're back where they started
                session.send(new PositionRotationMessage(oldLocation));
                return;
            }

            if (!event.getTo().equals(newLocation)) {
                // teleport to the set destination: fires PlayerTeleportEvent and
View Full Code Here

Examples of net.lightstone.msg.PositionRotationMessage

    double stance = buffer.readDouble();
    double z = buffer.readDouble();
    float rotation = buffer.readFloat();
    float pitch = buffer.readFloat();
    boolean onGround = buffer.readByte() == 1;
    return new PositionRotationMessage(x, y, z, stance, rotation, pitch, onGround);
  }
View Full Code Here

Examples of net.lightstone.msg.PositionRotationMessage

    // stream the initial set of blocks and teleport us
    this.streamBlocks();
    this.position = world.getSpawnPosition();
    this.sendMessage("§eWelcome to Lightstone, " + name + "!");
    this.session.send(new PositionRotationMessage(position.getX(), position.getY(), position.getZ(), position.getY() + NORMAL_EYE_HEIGHT, (float) rotation.getYaw(), (float) rotation.getPitch(), true));
  }
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.