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

@ -29,6 +29,8 @@ use pocketmine\Player;
*/
class PlayerAchievementAwardedEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
/** @var string */
protected $achievement;

View File

@ -29,6 +29,8 @@ use pocketmine\Player;
*/
class PlayerAnimationEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
const ARM_SWING = 1;

View File

@ -27,6 +27,8 @@ use pocketmine\Player;
class PlayerBedEnterEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
private $bed;

View File

@ -26,6 +26,8 @@ use pocketmine\Player;
class PlayerBedLeaveEvent extends PlayerEvent{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
private $bed;

View File

@ -27,6 +27,8 @@ use pocketmine\Player;
class PlayerBucketEmptyEvent extends PlayerBucketEvent{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
public function __construct(Player $who, Block $blockClicked, $blockFace, Item $bucket, Item $itemInHand){
parent::__construct($who, $blockClicked, $blockFace, $bucket, $itemInHand);

View File

@ -27,6 +27,8 @@ use pocketmine\Player;
class PlayerBucketFillEvent extends PlayerBucketEvent{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
public function __construct(Player $who, Block $blockClicked, $blockFace, Item $bucket, Item $itemInHand){
parent::__construct($who, $blockClicked, $blockFace, $bucket, $itemInHand);

View File

@ -30,6 +30,8 @@ use pocketmine\Server;
*/
class PlayerChatEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
/** @var string */
protected $message;

View File

@ -34,6 +34,8 @@ use pocketmine\Player;
*/
class PlayerCommandPreprocessEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
/** @var string */
protected $message;

View File

@ -27,6 +27,8 @@ use pocketmine\Player;
class PlayerDeathEvent extends EntityDeathEvent{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
private $deathMessage;
private $keepInventory = false;

View File

@ -30,6 +30,8 @@ use pocketmine\Player;
*/
class PlayerDropItemEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
/** @var Item */
private $drop;

View File

@ -29,6 +29,8 @@ use pocketmine\Player;
*/
class PlayerGameModeChangeEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
/** @var int */
protected $gamemode;

View File

@ -31,6 +31,8 @@ use pocketmine\Player;
*/
class PlayerInteractEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
/**
* @var \pocketmine\block\Block;

View File

@ -30,6 +30,8 @@ use pocketmine\Player;
*/
class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
/** @var Item */
private $item;

View File

@ -28,6 +28,8 @@ use pocketmine\Player;
class PlayerItemHeldEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
private $item;
private $slot;

View File

@ -28,6 +28,8 @@ use pocketmine\Player;
*/
class PlayerJoinEvent extends PlayerEvent{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
/** @var string */
protected $joinMessage;

View File

@ -29,6 +29,8 @@ use pocketmine\Player;
*/
class PlayerKickEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
/** @var string */
protected $quitMessage;

View File

@ -29,6 +29,8 @@ use pocketmine\Player;
*/
class PlayerLoginEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
/** @var string */
protected $kickMessage;

View File

@ -27,6 +27,8 @@ use pocketmine\Player;
class PlayerMoveEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
private $from;
private $to;

View File

@ -29,6 +29,8 @@ use pocketmine\Player;
*/
class PlayerPreLoginEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
/** @var string */
protected $kickMessage;

View File

@ -28,6 +28,8 @@ use pocketmine\Player;
*/
class PlayerQuitEvent extends PlayerEvent{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
/** @var string */
protected $quitMessage;

View File

@ -29,6 +29,8 @@ use pocketmine\Player;
*/
class PlayerRespawnEvent extends PlayerEvent{
public static $handlerList = null;
public static $eventPool = [];
public static $nextEvent = 0;
/** @var Position */
protected $position;