Search in sources :

Example 1 with UpdateSignMessage

use of net.glowstone.net.message.play.game.UpdateSignMessage in project Glowstone by GlowstoneMC.

the class UpdateSignCodec method decode.

@Override
public UpdateSignMessage decode(ByteBuf buf) throws IOException {
    BlockVector pos = GlowBufUtils.readBlockPosition(buf);
    TextMessage[] message = new TextMessage[4];
    for (int i = 0; i < message.length; ++i) {
        message[i] = GlowBufUtils.readChat(buf);
    }
    return new UpdateSignMessage(pos.getBlockX(), pos.getBlockY(), pos.getBlockZ(), message);
}
Also used : BlockVector(org.bukkit.util.BlockVector) TextMessage(net.glowstone.util.TextMessage) UpdateSignMessage(net.glowstone.net.message.play.game.UpdateSignMessage)

Aggregations

UpdateSignMessage (net.glowstone.net.message.play.game.UpdateSignMessage)1 TextMessage (net.glowstone.util.TextMessage)1 BlockVector (org.bukkit.util.BlockVector)1