menu
#3761833 Argument 1 passed to PracticeParticle::get() must be an instance of pocketmine\level\Position, instance of pocketmine\math\Vector3 given

Submitted by PocketMine-MP 3.11.4

General information

Version: 3.11.4
Git commit: 13f28d84
Plugin involvement: Direct
Report date: 2020-02-13 13:52:33 +0000 UTC

System Information

PHP version: 7.2.16
Operating system: win
System banner: Windows NT DESKTOP-G8QPITE 10.0 build 18362 (Windows 10) AMD64

Error information

Warning: a plugin was directly involved in this crash. Please contact the plugin author.
Message: Argument 1 passed to PracticeParticle::get() must be an instance of pocketmine\level\Position, instance of pocketmine\math\Vector3 given
File: plugins/PracticeParticle
Line: #42
Error level: TypeError
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
			$player->getLevel()->addParticle(new DustParticle($pos, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255)));
}

if (isset($this->list[$name])) return;
$this->list[$name] = [];
$this->list[$name]["size"] = 8;
$this->list[$name]["pos"] = $pos;
}

public static function get(Position $center, float $radius): array {
if ($radius <= 0) return [];

$res = [];
$unit = 15 * (1 / $radius);
for ($deg = 0; $deg < 360; $deg += $unit) {
$res[] = $center->add(sin(deg2rad($deg)) * $radius, 0, cos(deg2rad($deg)) * $radius);
}

return $res;
}
#0 plugins/PracticeParticle(69): PracticeParticle::get(object pocketmine\math\Vector3, integer 8)
#1 src/pocketmine/scheduler/TaskHandler(169): ParticleTask->onRun(integer 241)
#2 src/pocketmine/scheduler/TaskScheduler(206): pocketmine\scheduler\TaskHandler->run(integer 241)
#3 src/pocketmine/plugin/PluginManager(703): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 241)
#4 src/pocketmine/Server(2670): pocketmine\plugin\PluginManager->tickSchedulers(integer 241)
#5 src/pocketmine/Server(2403): pocketmine\Server->tick()
#6 src/pocketmine/Server(2250): pocketmine\Server->tickProcessor()
#7 src/pocketmine/Server(1811): pocketmine\Server->start()
#8 src/pocketmine/PocketMine(274): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[47] C:\Users\capta\Desktop\PMMP\pocketmine-MP\PMMP\, string[55] C:\Users\capta\Desktop\PMMP\pocketmine-MP\PMMP\plugins\)
#9 src/pocketmine/PocketMine(297): pocketmine\server()
#10 (1): require(string[102] phar://C:/Users/capta/Desktop/PMMP/pocketmine-MP/PMMP/PocketMine-MP.phar/src/poc)

Loaded Plugins

  • Show

Server Settings

  • Show