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

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


  @EventHandler
  public void onExperienceChange(PlayerExperienceChangeEvent event) {
    Player player = event.getPlayer();
    Level level = player.add(Level.class);
    event.getMessages().add(new PlayerExperienceMessage(level.getProgress(), level.getLevel(), event.getNewExp()));
  }
View Full Code Here


  @Override
  public PlayerExperienceMessage decode(ByteBuf buffer) throws IOException {
    float barValue = buffer.readFloat();
    short level = buffer.readShort();
    short totalExp = buffer.readShort();
    return new PlayerExperienceMessage(barValue, level, totalExp);
  }
View Full Code Here

TOP

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

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.