@Override public void readData(DataInputStream input) throws IOException { super.readData(input); this.setText(PacketUtil.readString(input)); this.setCentered(input.readBoolean()); this.setHexColor(input.readInt()); }
@Override public void writeData(DataOutputStream output) throws IOException { super.writeData(output); PacketUtil.writeString(output, getText()); output.writeBoolean(isCentered()); output.writeInt(getHexColor()); }
@Override public int getNumBytes() { return super.getNumBytes() + PacketUtil.getNumBytes(getText()) + 5; }