mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 05:34:54 +00:00
Fixed a few missing methods due to multiworld conversion
This commit is contained in:
parent
7bbda6dd67
commit
4678b57c75
@ -229,7 +229,7 @@ class BlockAPI{
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if($this->server->api->getProperty("item-enforcement") === false){
|
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{
|
}else{
|
||||||
$player->addItem($item->getID(), $item->getMetadata(), $item->count);
|
$player->addItem($item->getID(), $item->getMetadata(), $item->count);
|
||||||
}
|
}
|
||||||
@ -781,4 +781,4 @@ class BlockAPI{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ class TimeAPI{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function set($time, $level = false){
|
public function set($time, $level = false){
|
||||||
if(($level instanceof Level)){
|
if(!($level instanceof Level)){
|
||||||
$level = $this->server->api->level->getDefault();
|
$level = $this->server->api->level->getDefault();
|
||||||
}
|
}
|
||||||
if(is_string($time) and isset($this->phases[$time])){
|
if(is_string($time) and isset($this->phases[$time])){
|
||||||
@ -135,4 +135,4 @@ class TimeAPI{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1184,7 +1184,7 @@ class Player{
|
|||||||
$data["item"] = $item;
|
$data["item"] = $item;
|
||||||
if($this->blocked === false and $this->server->handle("player.drop", $data) !== false){
|
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){
|
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;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user