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

@ -49,7 +49,7 @@ class Mycelium extends Solid{
if($block === Block::DIRT){
$block = Block::get($block, $this->getLevel()->getBlockDataAt($x, $y, $z), Position::createPosition($x, $y, $z, $this->getLevel()));
if($block->getSide(1) instanceof Transparent){
Server::getInstance()->getPluginManager()->callEvent($ev = new BlockSpreadEvent($block, $this, new Mycelium()));
Server::getInstance()->getPluginManager()->callEvent($ev = BlockSpreadEvent::createEvent($block, $this, new Mycelium()));
if(!$ev->isCancelled()){
$this->getLevel()->setBlock($block, $ev->getNewState());
}