Hello I’m new and made a plugin called Manhunt. There is one problem. I need to make a compass and I have no idea how anyone give me an example of a compass or at least an item that tracks an player.
I believe there is already a working and great plugin out by korado531m7 that does just this. https://poggit.pmmp.io/p/NearestPlayerCompass/
That plugin crashes the server in use. Perhaps can show you the error and someone fix it or just find a another.
I tried using the that plugin but with the latest dev and gives me this error idk if anyone can fix this . It says undefined property on line 41 which is in here. PHP: private function sendEachType(Player $player, string $message){ switch(strtolower($this->getConfig()->get('sending-message-type'))){ case 'tip': $player->sendTip($message); break; case 'popup': $player->sendPopup($message); break; default: $player->sendMessage($message); break; } } private function setSpawnPositionPacket(Player $player, Vector3 $pos) : void{ $pk = new SetSpawnPositionPacket(); $pk->x = $pos->getFloorX(); $pk->y = $pos->getFloorY(); $pk->z = $pos->getFloorZ(); $pk->x2 = $pos->getFloorX(); $pk->y2 = $pos->getFloorY(); $pk->z2 = $pos->getFloorZ(); $pk->dimension = DimensionIds::OVERWORLD; $pk->spawnType = SetSpawnPositionPacket::TYPE_WORLD_SPAWN; $player->dataPacket($pk); }