Added /tp

This commit is contained in:
Shoghi Cervantes
2014-04-02 19:04:07 +02:00
parent 8c4afcd21a
commit c81266d1da
3 changed files with 98 additions and 2 deletions

View File

@ -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;