menu
#7034938 Call to undefined method pocketmine\world\World::getLocation()

Submitted by PocketMine-MP 4.5.1

General information

Version: 4.5.1
Git commit: d641812c
Plugin involvement: Direct
Report date: 2022-06-23 14:25:11 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 56 seconds

System Information

PHP version: 8.0.19
Operating system: win
System banner: Windows NT DESKTOP-9P84H7C 10.0 build 19043 (Windows 10) AMD64

Error information

Warning: the CosmeticsUI plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method pocketmine\world\World::getLocation()
File: plugins/ParticleUI.phar/src/CosmeticsUI/Task/HeartParticleActivate
Line: #26
Error level: Error
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
    }

public function onRun(): void{
foreach($this->plugin->getServer()->getOnlinePlayers() as $player) {
$name = $player->getName();

$player = $this->player;
$level = $player->getWorld();

$x = $level->getLocation()->getFloorX();
$y = $level->getLocation()->getFloorY();
$z = $level->getLocation()->getFloorZ();

$level->addParticle(new HeartParticle(new Vector3($x, $y + 0.5, $z)));
$level->addParticle(new HeartParticle(new Vector3($x, $y + 1, $z)));
$level->addParticle(new HeartParticle(new Vector3($x, $y + 1.5, $z)));
$level->addParticle(new HeartParticle(new Vector3($x, $y + 2, $z)));
}
}
}
#0 pmsrc/src/scheduler/TaskHandler(114): CosmeticsUI\Task\HeartParticleActivate->onRun()
#1 pmsrc/src/scheduler/TaskScheduler(141): pocketmine\scheduler\TaskHandler->run()
#2 pmsrc/src/plugin/PluginManager(498): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(int 875)
#3 pmsrc/src/Server(1811): pocketmine\plugin\PluginManager->tickSchedulers(int 875)
#4 pmsrc/src/Server(1700): pocketmine\Server->tick()
#5 pmsrc/src/Server(1063): pocketmine\Server->tickProcessor()
#6 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#3, string[34] C:\Users\anist\Desktop\PocketMine\, string[42] C:\Users\anist\Desktop\PocketMine\plugins\)
#7 pmsrc/src/PocketMine(327): pocketmine\server()
#8 pmsrc(11): require(string[78] phar://C:/Users/anist/Desktop/PocketMine/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show