Search in sources :

Example 1 with UserListHeaderFooterMessage

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

the class GlowPlayer method setPlayerListHeaderFooter.

@Override
public void setPlayerListHeaderFooter(BaseComponent[] header, BaseComponent[] footer) {
    TextMessage h = TextMessage.decode(ComponentSerializer.toString(header));
    TextMessage f = TextMessage.decode(ComponentSerializer.toString(footer));
    session.send(new UserListHeaderFooterMessage(h, f));
}
Also used : UserListHeaderFooterMessage(net.glowstone.net.message.play.game.UserListHeaderFooterMessage) TextMessage(net.glowstone.util.TextMessage)

Example 2 with UserListHeaderFooterMessage

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

the class UserListHeaderFooterCodec method decode.

@Override
public UserListHeaderFooterMessage decode(ByteBuf buffer) throws IOException {
    TextMessage header = GlowBufUtils.readChat(buffer);
    TextMessage footer = GlowBufUtils.readChat(buffer);
    return new UserListHeaderFooterMessage(header, footer);
}
Also used : UserListHeaderFooterMessage(net.glowstone.net.message.play.game.UserListHeaderFooterMessage) TextMessage(net.glowstone.util.TextMessage)

Aggregations

UserListHeaderFooterMessage (net.glowstone.net.message.play.game.UserListHeaderFooterMessage)2 TextMessage (net.glowstone.util.TextMessage)2