server will try reading packets until none left(or limit is reached)

This commit is contained in:
GameHerobrine 2024-07-04 06:31:44 +03:00
parent fcff48b5b8
commit d5a38220bf
3 changed files with 22 additions and 5 deletions

View file

@ -136,11 +136,13 @@ class ServerAPI{
"rcon.password" => substr(base64_encode(Utils::getRandomBytes(20, false)), 3, 10),
"auto-save" => true,
"enable-mob-ai" => true,
"abort-reading-after-N-packets" => PocketMinecraftServer::$PACKET_READING_LIMIT
]);
$this->parseProperties();
MobSpawner::$MOB_LIMIT = $this->getProperty("mobs-amount", 50);
Entity::$allowedAI = $this->getProperty("enable-mob-ai", true);
PocketMinecraftServer::$PACKET_READING_LIMIT = $this->getProperty("abort-reading-after-N-packets", PocketMinecraftServer::$PACKET_READING_LIMIT);
//Load advanced properties
define("DEBUG", $this->getProperty("debug", 1));
define("ADVANCED_CACHE", false);