This bug is really anoying, anyone know how to fix it please? I'm setting the spawn for my server and it's spawning me next to the place where i setted the spawn, but in the middle of 4 blocks How can i set the spawn in the middle of 1 block? Also, i've heard that MSpawns plugin might fix the bug, but it isnt working, the plugin is full of errors and bugs..
Developing your own plugin is a classic, you save the coordinates in a config and teleport the player to the exact coordinates
the corner of the block you are on is the coordinate you set. The middle of the block you are on is the coordinate you set plus .5 x and z
Yes, i tried /setworldspawn 0.5 60 3 and it keeps spawning me to the old place Also when i do /setworldspawn 0.5 60 3 the succesful message its like "Setting world spawn to 0 60 3 succesfully" So i think .5 doesnt work with setworldspawn but im not sure since it keeps spawning me to the old place even after i did /setworldspawn again
PHP: public function onLogin(PlayerJoinEvent $event){ $player = $event->getPlayer(); $player->teleport(new Vector3(X, Y, Z)); }} If anyone is looking, check the code above. Okay so now this is fixed but...how can i make the player look to North or South and how i can specify where exactly to look
Use Location class. This code could help you getting necessary parameters PHP: public function onMove(PlayerMoveEvent $event) { $player = $event->getPlayer(); $player->sendTip("X: ".$player->getFloorX(). " Y: ".$player->getFloorY()." Z: " . $player->getFloorZ()." Y n P: ".$player->getYaw().", ".$player->getPitch()); }
When player join, i want the player to look to the emerald blocks like in the pic How i can do that? https://pasteboard.co/JhWDH8w.jpg
Fixed! public function onLogin(PlayerJoinEvent $event){ $player = $event->getPlayer(); $player->teleport(new Vector3(X, Y, Z), 1.6076975332031); } }