Package io.netty.buffer

Examples of io.netty.buffer.ByteBuf.writeByte()


    buffer.writeInt(server.getId());
    VanillaByteBufUtils.writeString(buffer, server.getWorldType());
    buffer.writeByte(server.getGameMode());
    buffer.writeByte(server.getDimension());
    buffer.writeByte(server.getDifficulty());
    buffer.writeByte(0);
    buffer.writeByte(server.getMaxPlayers());
    return buffer;
  }

  @Override
View Full Code Here


    VanillaByteBufUtils.writeString(buffer, server.getWorldType());
    buffer.writeByte(server.getGameMode());
    buffer.writeByte(server.getDimension());
    buffer.writeByte(server.getDifficulty());
    buffer.writeByte(0);
    buffer.writeByte(server.getMaxPlayers());
    return buffer;
  }

  @Override
  public ByteBuf encodeToServer(PlayerLoginRequestMessage message) {
View Full Code Here

  public ByteBuf encodeToServer(PlayerLoginRequestMessage message) {
    PlayerLoginRequestMessage server = message;
    ByteBuf buffer = Unpooled.buffer();
    buffer.writeInt(server.getId());
    VanillaByteBufUtils.writeString(buffer, server.getWorldType());
    buffer.writeByte(server.getGameMode());
    buffer.writeByte(server.getDimension());
    buffer.writeByte(server.getDifficulty());
    buffer.writeByte(0);
    buffer.writeByte(server.getMaxPlayers());
    return buffer;
View Full Code Here

    PlayerLoginRequestMessage server = message;
    ByteBuf buffer = Unpooled.buffer();
    buffer.writeInt(server.getId());
    VanillaByteBufUtils.writeString(buffer, server.getWorldType());
    buffer.writeByte(server.getGameMode());
    buffer.writeByte(server.getDimension());
    buffer.writeByte(server.getDifficulty());
    buffer.writeByte(0);
    buffer.writeByte(server.getMaxPlayers());
    return buffer;
  }
View Full Code Here

    ByteBuf buffer = Unpooled.buffer();
    buffer.writeInt(server.getId());
    VanillaByteBufUtils.writeString(buffer, server.getWorldType());
    buffer.writeByte(server.getGameMode());
    buffer.writeByte(server.getDimension());
    buffer.writeByte(server.getDifficulty());
    buffer.writeByte(0);
    buffer.writeByte(server.getMaxPlayers());
    return buffer;
  }
}
View Full Code Here

    buffer.writeInt(server.getId());
    VanillaByteBufUtils.writeString(buffer, server.getWorldType());
    buffer.writeByte(server.getGameMode());
    buffer.writeByte(server.getDimension());
    buffer.writeByte(server.getDifficulty());
    buffer.writeByte(0);
    buffer.writeByte(server.getMaxPlayers());
    return buffer;
  }
}
View Full Code Here

    VanillaByteBufUtils.writeString(buffer, server.getWorldType());
    buffer.writeByte(server.getGameMode());
    buffer.writeByte(server.getDimension());
    buffer.writeByte(server.getDifficulty());
    buffer.writeByte(0);
    buffer.writeByte(server.getMaxPlayers());
    return buffer;
  }
}
View Full Code Here

  @Override
  public ByteBuf encode(ScoreboardTeamMessage message) throws IOException {
    ByteBuf buffer = Unpooled.buffer();
    VanillaByteBufUtils.writeString(buffer, message.getName());
    buffer.writeByte(message.getAction());
    switch (message.getAction()) {
      case 0:
      case 2:
        VanillaByteBufUtils.writeString(buffer, message.getDisplayName());
        VanillaByteBufUtils.writeString(buffer, message.getPrefix());
View Full Code Here

      case 0:
      case 2:
        VanillaByteBufUtils.writeString(buffer, message.getDisplayName());
        VanillaByteBufUtils.writeString(buffer, message.getPrefix());
        VanillaByteBufUtils.writeString(buffer, message.getSuffix());
        buffer.writeByte(message.isFriendlyFire() ? 1 : 0);
        break;
      case 3:
      case 4:
        buffer.writeShort(message.getPlayers().length);
        for (String name : message.getPlayers()) {
View Full Code Here

  @Override
  public ByteBuf encode(ScoreboardScoreMessage message) throws IOException {
    ByteBuf buffer = Unpooled.buffer();
    VanillaByteBufUtils.writeString(buffer, message.getItem());
    buffer.writeByte(message.isRemove() ? 1 : 0);
    if (!message.isRemove()) {
      VanillaByteBufUtils.writeString(buffer, message.getScoreboard());
      buffer.writeInt(message.getValue());
    }
    return buffer;
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.