blob: d1c766c3781bc1b595b71ab8cee00dbe5c4d52ac [file] [log] [blame] [raw]
package protocolsupport.protocol.utils.datawatcher.objects;
import io.netty.buffer.ByteBuf;
import protocolsupport.api.ProtocolVersion;
import protocolsupport.protocol.serializer.StringSerializer;
import protocolsupport.protocol.utils.datawatcher.ReadableDataWatcherObject;
public class DataWatcherObjectString extends ReadableDataWatcherObject<String> {
public DataWatcherObjectString() {
}
public DataWatcherObjectString(String string) {
value = string;
}
@Override
public void readFromStream(ByteBuf from, ProtocolVersion version, String locale) {
value = StringSerializer.readString(from, version);
}
@Override
public void writeToStream(ByteBuf to, ProtocolVersion version, String locale) {
StringSerializer.writeString(to, version, value);
}
}