Package org.spout.vanilla.protocol.msg.player

Examples of org.spout.vanilla.protocol.msg.player.PlayerAbilityMessage


    event.getMessages().add(new EntityItemDataMessage(VanillaMaterials.MAP, (short) event.getItemData(), event.getData()));
  }

  @EventHandler
  public void onPlayerAbilityUpdate(PlayerAbilityUpdateEvent event) {
    event.getMessages().add(new PlayerAbilityMessage(event.getGodMode(), event.isFlying(), event.canFly(), event.isCreativeMode(), event.getFlyingSpeed(), event.getWalkingSpeed()));
  }
View Full Code Here


    boolean isFlying = LogicUtil.getBit(flag, 0x2);
    boolean canFly = LogicUtil.getBit(flag, 0x4);
    boolean creativeMode = LogicUtil.getBit(flag, 0x8);
    float flyingSpeed = buffer.readFloat();
    float walkingSpeed = buffer.readFloat();
    return new PlayerAbilityMessage(godMode, isFlying, canFly, creativeMode, flyingSpeed, walkingSpeed);
  }
View Full Code Here

TOP

Related Classes of org.spout.vanilla.protocol.msg.player.PlayerAbilityMessage

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.