New way to spawn entities/tiles using a global register table, allow overriding default entity/tile classes via classes

This commit is contained in:
Shoghi Cervantes
2014-10-28 13:09:27 +01:00
parent a5b85c549a
commit 34ae760def
18 changed files with 154 additions and 94 deletions

View File

@ -21,7 +21,7 @@
namespace pocketmine\event\entity;
use pocketmine\entity\DroppedItem;
use pocketmine\entity\Item;
use pocketmine\event\Cancellable;
class ItemDespawnEvent extends EntityEvent implements Cancellable{
@ -30,15 +30,15 @@ class ItemDespawnEvent extends EntityEvent implements Cancellable{
public static $nextEvent = 0;
/**
* @param DroppedItem $item
* @param Item $item
*/
public function __construct(DroppedItem $item){
public function __construct(Item $item){
$this->entity = $item;
}
/**
* @return DroppedItem
* @return Item
*/
public function getEntity(){
return $this->entity;