mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 04:00:29 +00:00
Eradicate remaining usages of public Position->world field
and as an added bonus, ditch a bunch of extra phpstan errors
This commit is contained in:
@@ -1337,7 +1337,7 @@ abstract class Entity{
|
||||
return false;
|
||||
}
|
||||
|
||||
if($pos instanceof Position and $pos->world !== null and $pos->world !== $this->getWorld()){
|
||||
if($pos instanceof Position and $pos->isValid() and $pos->getWorldNonNull() !== $this->getWorld()){
|
||||
if(!$this->switchWorld($pos->getWorldNonNull())){
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user