コード例 #1
0
 @Override
 public PacketWriter write() throws IOException {
   PacketWriter packetWriter = new PacketWriter(this);
   packetWriter.writeUTF(name);
   packetWriter.writeUTF(alias);
   return packetWriter;
 }
コード例 #2
0
  @Override
  public PacketWriter write() throws IOException {
    PacketWriter packetWriter = new PacketWriter(this);
    packetWriter.writeUTF(message);
    packetWriter.writeUTF(channel);

    StringBuilder sb = new StringBuilder();
    Iterator<String> stringIterator = to.iterator();
    while (stringIterator.hasNext()) {
      sb.append(stringIterator.next());

      if (stringIterator.hasNext()) {
        sb.append("§");
      }
    }

    packetWriter.writeUTF(sb.toString());
    return packetWriter;
  }
コード例 #3
0
  @Override
  protected PacketWriter write() throws IOException {
    PacketWriter packetWriter = new PacketWriter(this);
    packetWriter.writeUTF(mode);
    packetWriter.writeUTF(message);

    if (players == null) {
      packetWriter.writeUTF("null");
    } else {
      packetWriter.writeUTF(StringUtils.join(players, "§"));
    }

    packetWriter.writeUTF(townName);
    packetWriter.writeUTF(nationName);

    return packetWriter;
  }
コード例 #4
0
 @Override
 public PacketWriter write() throws IOException {
   PacketWriter packetWriter = new PacketWriter(this);
   packetWriter.writeBoolean(afk);
   return packetWriter;
 }