mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Fixed Entity being set position after being closed
This commit is contained in:
parent
66acb5cdd7
commit
4569a73f3d
@ -1072,6 +1072,10 @@ abstract class Entity extends Location implements Metadatable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function setPosition(Vector3 $pos){
|
public function setPosition(Vector3 $pos){
|
||||||
|
if($this->closed){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if($pos instanceof Position and $pos->level instanceof Level and $pos->level !== $this->level){
|
if($pos instanceof Position and $pos->level instanceof Level and $pos->level !== $this->level){
|
||||||
if($this->switchLevel($pos->getLevel()) === false){
|
if($this->switchLevel($pos->getLevel()) === false){
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user