mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Fixed a bunch of missed Position->getLevel() usages
these were not in the usage search because PhpStorm decided to refer to ChunkLoader->getLevel() for any Player references, which caused them to only show when that was searched. There's also an undetected LSP violation with ChunkLoader because it requires returning Level and Position->getLevel() returns Level|null. I don't know why PHPStan doesn't complain about that.
This commit is contained in:
@ -41,7 +41,7 @@ class SpawnEgg extends Item{
|
||||
$nbt->setString("CustomName", $this->getCustomName());
|
||||
}
|
||||
|
||||
$entity = Entity::createEntity($this->meta, $player->getLevel(), $nbt);
|
||||
$entity = Entity::createEntity($this->meta, $player->getLevelNonNull(), $nbt);
|
||||
|
||||
if($entity instanceof Entity){
|
||||
$this->pop();
|
||||
|
Reference in New Issue
Block a user