本文整理汇总了PHP中pocketmine\command\CommandSender::getfloorZ方法的典型用法代码示例。如果您正苦于以下问题:PHP CommandSender::getfloorZ方法的具体用法?PHP CommandSender::getfloorZ怎么用?PHP CommandSender::getfloorZ使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pocketmine\command\CommandSender
的用法示例。
在下文中一共展示了CommandSender::getfloorZ方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onCommand
public function onCommand(CommandSender $sender, Command $cmd, $label, array $sub)
{
$rm = "Usage: /ViewLocation ";
$mm = "[ViewLocation] ";
$ik = $this->isKorean();
if (isset($sub[0])) {
$p = $this->getServer()->getPlayer($sub[0]);
if ($p) {
$sender->sendMessage($mm . $p->getName() . ($ik ? " 님의 좌표" : "\\'s Location") . ":: X: " . $p->getfloorX() . " Y: " . $p->getfloorY() . " Z:" . $p->getfloorZ());
} else {
$sender->sendMessage($ik ? $mm . "{$sub['0']} 는 잘못된 플레이어명입니다." : $mm . "{$sub['0']} is invalid player");
}
} else {
$sender->sendMessage($ik ? $rm . "<플레이어명>" : $rm . "<PlayerName>");
if ($sender instanceof Player) {
$sender->sendMessage($mm . ($ik ? " 본인의 좌표" : "\\'s Location") . ":: X: " . $sender->getfloorX() . " Y: " . $sender->getfloorY() . " Z:" . $sender->getfloorZ());
}
}
return true;
}