so I want to find out how to allow players to use my texture pack for my server but I am not 100% sure how all this works Data Packet from genisys (I added this to my core plugin) PHP: <?phpnamespace ServerCore\Packets;class ResourcePacksInfoPacket extends DataPacket{ const NETWORK_ID = Info::RESOURCE_PACKS_INFO_PACKET; public $mustAccept = false; public $behaviourPackEntries = []; public $resourcePackEntries = []; public function decode(){ } public function encode(){ $this->reset(); $this->putBool($this->mustAccept); $this->putShort(count($this->behaviourPackEntries)); foreach($this->behaviourPackEntries as $entry){ $this->putString($entry->getPackId()); $this->putString($entry->getVersion()); $this->putLong($entry->getPackSize()); } $this->putShort(count($this->resourcePackEntries)); foreach($this->resourcePackEntries as $entry){ $this->putString($entry->getPackId()); $this->putString($entry->getVersion()); $this->putLong($entry->getPackSize()); } }} This is what I have when players join not sure what to do from here PHP: public function onJoin(PlayerJoinEvent $event){ $player = $event->getPlayer(); $pk = new Packets\ResourcePacksInfoPacket(); $pk->mustAccept = false; $pk->behaviourPackEntries = []; $pk->resourcePackEntries = []; $player->dataPacket($pk);
Lol I was hoping someone has found something or a way of doing this I'm a noobish programmer so I'm not really sure what to do myself