mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Added /tp
This commit is contained in:
@ -66,8 +66,8 @@ class SpawnpointCommand extends VanillaCommand{
|
||||
if(count($args) === 4){
|
||||
if($level !== null){
|
||||
$x = (int) $this->getRelativeDouble($sender->x, $sender, $args[1]);
|
||||
$y = (int) $this->getRelativeDouble($sender->y, $sender, $args[2]);
|
||||
$z = (int) $this->getRelativeDouble($sender->z, $sender, $args[3], 0, 128);
|
||||
$y = (int) $this->getRelativeDouble($sender->y, $sender, $args[2], 0, 128);
|
||||
$z = (int) $this->getRelativeDouble($sender->z, $sender, $args[3]);
|
||||
$target->setSpawn(new Position($x, $y, $z, $level));
|
||||
Command::broadcastCommandMessage($sender, "Set ".$target->getName()."'s spawnpoint to ".$x.", ".$y.", ".$z);
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user