package org.kne.cloud.network.minecraft;

import java.io.IOException;

import org.kne.io.VarDataInputStream;
import org.kne.io.VarDataOutputStream;

public class MinecraftMotdResponse extends MinecraftPacket {
	private String json;

	public String getJson() {
		return json;
	}
	public MinecraftMotdResponse(String json) {
		this();
		this.json=json;
	}
	@Override
	public String toString() {
		return "MotdMinecraftResponse [json=" + json + "]";
	}
	public MinecraftMotdResponse() {
		super(HANDSHAKE_MOTD);
	}

	@Override
	protected void writeToStream(VarDataOutputStream dto) throws IOException {
		super.writeToStream(dto);
		dto.writeVarUTF8(json);
	}

	@Override
	protected void readFromStream(VarDataInputStream din) throws IOException {
		super.readFromStream(din);
		json=din.readVarUTF8();
	}
	
}
