mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 17:06:16 +00:00
Backport 58cafc853f
: s/level/world (strings only)
we should look at doing this for code too, but for now I'm not planning to break everyone's plugins.
This commit is contained in:
@ -64,7 +64,7 @@ class Position extends Vector3{
|
||||
*/
|
||||
public function getLevel(){
|
||||
if($this->level !== null and $this->level->isClosed()){
|
||||
MainLogger::getLogger()->debug("Position was holding a reference to an unloaded Level");
|
||||
MainLogger::getLogger()->debug("Position was holding a reference to an unloaded world");
|
||||
$this->level = null;
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ class Position extends Vector3{
|
||||
*/
|
||||
public function setLevel(Level $level = null){
|
||||
if($level !== null and $level->isClosed()){
|
||||
throw new \InvalidArgumentException("Specified level has been unloaded and cannot be used");
|
||||
throw new \InvalidArgumentException("Specified world has been unloaded and cannot be used");
|
||||
}
|
||||
|
||||
$this->level = $level;
|
||||
|
Reference in New Issue
Block a user