import { PacketHandler } from "../../../packets/packet" ; import { PolusBuffer } from "../../../util/polusBuffer" ; export interface AnnouncementDataPacket { type : "AnnouncementData" ; Id : number ; Text : string ; } export const AnnouncementData = { parse ( packet ) { return { type : "AnnouncementData" , Id : packet . readVarInt ( ) , Text : packet . readString ( ) , } ; } , serialize ( packet ) { let buf = new PolusBuffer ( ) ; buf . writeVarInt ( packet . Id ) ; buf . writeString ( packet . Text ) ; return buf ; } , } ;