use of net.glowstone.net.message.play.game.StopSoundMessage in project Glowstone by GlowstoneMC.
the class StopSoundCodec method decode.
@Override
public StopSoundMessage decode(ByteBuf buf) throws IOException {
byte flags = buf.readByte();
SoundCategory source = ((flags & FLAG_SOURCE) != 0) ? SOURCE_ID_MAP.inverse().get(readVarInt(buf)) : null;
String sound = ((flags & FLAG_SOUND) != 0) ? readUTF8(buf) : null;
return new StopSoundMessage(source, sound);
}
Aggregations