Package org.spout.vanilla.component.entity.player

Examples of org.spout.vanilla.component.entity.player.Ping


import org.spout.vanilla.protocol.msg.player.conn.PlayerPingMessage;

public class PlayerPingHandler extends MessageHandler<PlayerPingMessage> {
  @Override
  public void handleServer(ServerSession session, PlayerPingMessage message) {
    Ping ping = session.getPlayer().get(Ping.class);
    if (ping != null) {
      ping.response(message.getPingId());
    }
  }
View Full Code Here


  @Override
  public void handleServer(ServerSession session, PlayerPositionMessage message) {
    final Player holder = session.getPlayer();
    final RepositionManager rmInverse = holder.getNetwork().getRepositionManager().getInverse();

    Ping ping = holder.get(Ping.class);
    if (ping != null) {
      ping.refresh();
    }

    final Point rawPosition = new Point(message.getPosition(), holder.getWorld());
    final Point newPosition = rmInverse.convert(rawPosition);
    final Point position = holder.getPhysics().getPosition();
View Full Code Here

import org.spout.vanilla.protocol.VanillaProtocol;

public class ChunkCacheHandler extends MessageHandler<ChunkCacheMessage> {
  @Override
  public void handleServer(ServerSession session, ChunkCacheMessage message) {
    Ping ping = session.getPlayer().get(Ping.class);
    if (ping != null) {
      ping.refresh();
    }
    session.getDataMap().get(VanillaProtocol.CHUNK_NET_CACHE).handleCustomPacket(message.getChannel(), message.getData());
  }
View Full Code Here

TOP

Related Classes of org.spout.vanilla.component.entity.player.Ping

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.