LowMemoryEvent
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() : intReturns the memory usage at the time of the event call (in bytes)
getMemoryFreed()
php
public function getMemoryFreed() : intAmount of memory already freed
getMemoryLimit()
php
public function getMemoryLimit() : intReturns the memory limit defined (in bytes)
getTriggerCount()
php
public function getTriggerCount() : intReturns the times this event has been called in the current low-memory state
isGlobal()
php
public function isGlobal() : bool