mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
More language files
This commit is contained in:
@ -34,7 +34,7 @@ class SpawnpointCommand extends VanillaCommand{
|
||||
parent::__construct(
|
||||
$name,
|
||||
"Sets a player's spawn point",
|
||||
"/spawnpoint OR /spawnpoint <player> OR /spawnpoint <player> <x> <y> <z>"
|
||||
"%commands.spawnpoint.usage"
|
||||
);
|
||||
$this->setPermission("pocketmine.command.spawnpoint");
|
||||
}
|
||||
@ -57,7 +57,7 @@ class SpawnpointCommand extends VanillaCommand{
|
||||
}else{
|
||||
$target = $sender->getServer()->getPlayer($args[0]);
|
||||
if($target === null){
|
||||
$sender->sendMessage(TextFormat::RED . "Can't find player " . $args[0]);
|
||||
$sender->sendMessage(new TranslationContainer(TextFormat::RED . "%commands.generic.player.notFound"));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -72,7 +72,8 @@ class SpawnpointCommand extends VanillaCommand{
|
||||
$y = $this->getRelativeDouble($pos->y, $sender, $args[2], 0, 128);
|
||||
$z = $this->getRelativeDouble($pos->z, $sender, $args[3]);
|
||||
$target->setSpawn(new Position($x, $y, $z, $level));
|
||||
Command::broadcastCommandMessage($sender, "Set " . $target->getDisplayName() . "'s spawnpoint to " . $x . ", " . $y . ", " . $z);
|
||||
|
||||
Command::broadcastCommandMessage($sender, new TranslationContainer("commands.spawnpoint.success", [$target->getName(), round($x, 2), round($y, 2), round($z, 2)]));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -80,8 +81,8 @@ class SpawnpointCommand extends VanillaCommand{
|
||||
if($sender instanceof Player){
|
||||
$pos = new Position((int) $sender->x, (int) $sender->y, (int) $sender->z, $sender->getLevel());
|
||||
$target->setSpawn($pos);
|
||||
Command::broadcastCommandMessage($sender, "Set " . $target->getDisplayName() . "'s spawnpoint to " . $pos->x . ", " . $pos->y . ", " . $pos->z);
|
||||
|
||||
Command::broadcastCommandMessage($sender, new TranslationContainer("commands.spawnpoint.success", [$target->getName(), round($pos->x, 2), round($pos->y, 2), round($pos->z, 2)]));
|
||||
return true;
|
||||
}else{
|
||||
$sender->sendMessage(TextFormat::RED . "Please provide a player!");
|
||||
|
Reference in New Issue
Block a user