mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 23:29:54 +00:00
Don't save players with chunks!
I can't believe I didn't notice this
This commit is contained in:
parent
23752548fe
commit
b9c4a65307
@ -38,6 +38,7 @@ use pocketmine\nbt\tag\{
|
|||||||
ByteTag, CompoundTag, FloatTag, IntTag, LongTag, StringTag
|
ByteTag, CompoundTag, FloatTag, IntTag, LongTag, StringTag
|
||||||
};
|
};
|
||||||
use pocketmine\network\mcpe\protocol\ProtocolInfo;
|
use pocketmine\network\mcpe\protocol\ProtocolInfo;
|
||||||
|
use pocketmine\Player;
|
||||||
use pocketmine\tile\Tile;
|
use pocketmine\tile\Tile;
|
||||||
use pocketmine\utils\Binary;
|
use pocketmine\utils\Binary;
|
||||||
use pocketmine\utils\BinaryStream;
|
use pocketmine\utils\BinaryStream;
|
||||||
@ -501,7 +502,9 @@ class LevelDB extends BaseLevelProvider{
|
|||||||
$this->db->put($index . self::TAG_STATE_FINALISATION, chr(self::FINALISATION_DONE));
|
$this->db->put($index . self::TAG_STATE_FINALISATION, chr(self::FINALISATION_DONE));
|
||||||
|
|
||||||
$this->writeTags($chunk->getTiles(), $index . self::TAG_BLOCK_ENTITY);
|
$this->writeTags($chunk->getTiles(), $index . self::TAG_BLOCK_ENTITY);
|
||||||
$this->writeTags($chunk->getEntities(), $index . self::TAG_ENTITY);
|
$this->writeTags(array_filter($chunk->getEntities(), function(Entity $entity) : bool{
|
||||||
|
return !($entity instanceof Player);
|
||||||
|
}), $index . self::TAG_ENTITY);
|
||||||
|
|
||||||
$this->db->delete($index . self::TAG_DATA_2D_LEGACY);
|
$this->db->delete($index . self::TAG_DATA_2D_LEGACY);
|
||||||
$this->db->delete($index . self::TAG_LEGACY_TERRAIN);
|
$this->db->delete($index . self::TAG_LEGACY_TERRAIN);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user