mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 10:49:10 +00:00
Added debug messages for resource requests with invalid pack IDs
This commit is contained in:
parent
e1fb4a44e9
commit
ed765a2c9b
@ -1994,6 +1994,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
if(!($pack instanceof ResourcePack)){
|
if(!($pack instanceof ResourcePack)){
|
||||||
//Client requested a resource pack but we don't have it available on the server
|
//Client requested a resource pack but we don't have it available on the server
|
||||||
$this->close("", "disconnectionScreen.resourcePack", true);
|
$this->close("", "disconnectionScreen.resourcePack", true);
|
||||||
|
$this->server->getLogger()->debug("Got a resource pack request for unknown pack with UUID " . $uuid . ", available packs: " . implode(", ", $manager->getPackIdList()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3320,6 +3321,8 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
$pack = $manager->getPackById($packet->packId);
|
$pack = $manager->getPackById($packet->packId);
|
||||||
if(!($pack instanceof ResourcePack)){
|
if(!($pack instanceof ResourcePack)){
|
||||||
$this->close("", "disconnectionScreen.resourcePack", true);
|
$this->close("", "disconnectionScreen.resourcePack", true);
|
||||||
|
$this->server->getLogger()->debug("Got a resource pack chunk request for unknown pack with UUID " . $uuid . ", available packs: " . implode(", ", $manager->getPackIdList()));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,4 +126,11 @@ class ResourcePackManager{
|
|||||||
public function getPackById(string $id){
|
public function getPackById(string $id){
|
||||||
return $this->uuidList[$id] ?? null;
|
return $this->uuidList[$id] ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string[]
|
||||||
|
*/
|
||||||
|
public function getPackIdList() : array{
|
||||||
|
return array_keys($this->uuidList);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user