Merge pull request #250 from zhuowei/master

Fixed a few missing methods due to the Multiworld conversion fixed #248
This commit is contained in:
Shoghi Cervantes 2013-05-16 22:20:38 -07:00
commit f3fe0a6d27
3 changed files with 5 additions and 5 deletions

View File

@ -229,7 +229,7 @@ class BlockAPI{
break;
}
if($this->server->api->getProperty("item-enforcement") === false){
$this->drop(new Vector3($player->entity->x - 0.5, $player->entity->y, $player->entity->z - 0.5), $item, true);
$this->server->api->entity->drop(new Position($player->entity->x - 0.5, $player->entity->y, $player->entity->z - 0.5, $player->level), $item, true);
}else{
$player->addItem($item->getID(), $item->getMetadata(), $item->count);
}
@ -781,4 +781,4 @@ class BlockAPI{
}
}
}
}

View File

@ -123,7 +123,7 @@ class TimeAPI{
}
public function set($time, $level = false){
if(($level instanceof Level)){
if(!($level instanceof Level)){
$level = $this->server->api->level->getDefault();
}
if(is_string($time) and isset($this->phases[$time])){
@ -135,4 +135,4 @@ class TimeAPI{
}
}
}

View File

@ -1184,7 +1184,7 @@ class Player{
$data["item"] = $item;
if($this->blocked === false and $this->server->handle("player.drop", $data) !== false){
if($this->removeItem($item->getID(), $item->getMetadata(), $item->count) === true or $this->itemEnforcement !== true){
$this->server->api->block->drop(new Vector3($this->entity->x - 0.5, $this->entity->y, $this->entity->z - 0.5), $item);
$this->server->api->entity->drop(new Position($this->entity->x - 0.5, $this->entity->y, $this->entity->z - 0.5, $this->level), $item);
}
}
break;