Skip to content

NeverSavedWithChunkEntity ​

interface · pocketmine\entity\NeverSavedWithChunkEntity · source

Decorator for entities that will never be saved with a chunk. Entities implementing this interface are not required to register a save ID.

This differs from Entity::canSaveWithChunk() because it can't be changed after the entity is created. We can't use canSaveWithChunk() to decide whether an entity needs a save ID, but we can use an interface like this. An attribute would also work, but instanceof NonSaveable is easier.

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.