Added Event allocation pool, updated SPL with Class::onClassLoaded()

This commit is contained in:
Shoghi Cervantes
2014-10-28 10:47:40 +01:00
parent 144a871c07
commit 350cee3d41
111 changed files with 327 additions and 109 deletions

View File

@ -28,6 +28,8 @@ use pocketmine\level\format\FullChunk;
*/
class ChunkLoadEvent extends ChunkEvent{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
private $newChunk;

View File

@ -26,4 +26,6 @@ namespace pocketmine\event\level;
*/
class ChunkPopulateEvent extends ChunkEvent{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
}

View File

@ -28,4 +28,6 @@ use pocketmine\event\Cancellable;
*/
class ChunkUnloadEvent extends ChunkEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
}

View File

@ -26,4 +26,6 @@ namespace pocketmine\event\level;
*/
class LevelInitEvent extends LevelEvent{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
}

View File

@ -26,4 +26,6 @@ namespace pocketmine\event\level;
*/
class LevelLoadEvent extends LevelEvent{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
}

View File

@ -26,4 +26,6 @@ namespace pocketmine\event\level;
*/
class LevelSaveEvent extends LevelEvent{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
}

View File

@ -28,4 +28,6 @@ use pocketmine\event\Cancellable;
*/
class LevelUnloadEvent extends LevelEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
}

View File

@ -30,6 +30,8 @@ use pocketmine\level\Position;
*/
class SpawnChangeEvent extends LevelEvent{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
/** @var Position */
private $previousSpawn;