Added /spawnpoint

This commit is contained in:
Shoghi Cervantes
2014-04-02 18:40:24 +02:00
parent 5cadc665d1
commit 8c4afcd21a
3 changed files with 89 additions and 2 deletions

View File

@@ -45,14 +45,14 @@ abstract class VanillaCommand extends Command{
return $i;
}
protected function getRelativeDouble($original, CommandSender $sender, $input){
protected function getRelativeDouble($original, CommandSender $sender, $input, $min = self::MIN_COORD, $max = self::MAX_COORD){
if($input{0} === "~"){
$value = $this->getDouble($sender, substr($input, 1));
return $original + $value;
}
return $this->getDouble($input);
return $this->getDouble($sender, $input, $min, $max);
}
protected function getDouble(CommandSender $sender, $value, $min = self::MIN_COORD, $max = self::MAX_COORD){