Skip to content

LowMemoryEvent ​

class · pocketmine\event\server\LowMemoryEvent · source

Extends ServerEvent

Called when the server is in a low-memory state as defined by the properties Plugins should free caches or other non-essential data.

Methods ​

__construct() ​

php
public function __construct(int $memory, int $memoryLimit, bool $isGlobal = false, int $triggerCount = 0)

getMemory() ​

php
public function getMemory() : int

Returns the memory usage at the time of the event call (in bytes)

getMemoryFreed() ​

php
public function getMemoryFreed() : int

Amount of memory already freed

getMemoryLimit() ​

php
public function getMemoryLimit() : int

Returns the memory limit defined (in bytes)

getTriggerCount() ​

php
public function getTriggerCount() : int

Returns the times this event has been called in the current low-memory state

isGlobal() ​

php
public function isGlobal() : bool

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