Search in sources :

Example 1 with TabCompleteMessage

use of net.glowstone.net.message.play.player.TabCompleteMessage in project Glowstone by GlowstoneMC.

the class TabCompleteCodec method decode.

@Override
public TabCompleteMessage decode(ByteBuf buf) throws IOException {
    String text = ByteBufUtils.readUTF8(buf);
    boolean assumeCommand = buf.readBoolean();
    boolean hasLocation = buf.readBoolean();
    BlockVector location = null;
    if (hasLocation) {
        location = GlowBufUtils.readBlockPosition(buf);
    }
    return new TabCompleteMessage(text, assumeCommand, location);
}
Also used : TabCompleteMessage(net.glowstone.net.message.play.player.TabCompleteMessage) BlockVector(org.bukkit.util.BlockVector)

Aggregations

TabCompleteMessage (net.glowstone.net.message.play.player.TabCompleteMessage)1 BlockVector (org.bukkit.util.BlockVector)1