import { PolusBuffer } from "../../util/polusBuffer" ; import { PacketHandler } from "../packet" ; import { RoomCode } from "../packetElements/roomCode" ; export interface KickPlayerPacket { type : "KickPlayer" ; RoomCode : string ; ClientID : number ; isBanned : boolean ; } export const KickPlayer = { parse ( packet ) { return { type : "KickPlayer" , RoomCode : RoomCode . decode ( packet . read32 ( ) ) , ClientID : packet . readVarInt ( ) , isBanned : packet . readBoolean ( ) , } ; } , serialize ( packet ) { var buf = new PolusBuffer ( ) ; buf . write32 ( RoomCode . encode ( packet . RoomCode ) ) ; buf . writeVarInt ( packet . ClientID ) ; buf . writeBoolean ( packet . isBanned ) ; return buf ; } , } ;