本文整理汇总了PHP中pocketmine\level\Level::getTickRate方法的典型用法代码示例。如果您正苦于以下问题:PHP Level::getTickRate方法的具体用法?PHP Level::getTickRate怎么用?PHP Level::getTickRate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pocketmine\level\Level
的用法示例。
在下文中一共展示了Level::getTickRate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendLevelInfo
/**
* @param CommandSender $sender
* @param Level $level
*/
public function sendLevelInfo(CommandSender $sender, Level $level)
{
$sender->sendMessage("Name: " . $level->getName());
$sender->sendMessage("Id: " . $level->getId());
$sender->sendMessage("Entities: " . count($level->getEntities()));
$sender->sendMessage("Players: " . count($level->getPlayers()));
$sender->sendMessage("Tiles: " . count($level->getTiles()));
$sender->sendMessage("Chunks: " . count($level->getChunks()));
$sender->sendMessage("Loaders: " . count($level->getLoaders()));
$sender->sendMessage("Spawn: " . $level->getSafeSpawn()->getFloorX() . ":" . $level->getSafeSpawn()->getFloorY() . ":" . $level->getSafeSpawn()->getFloorZ());
$sender->sendMessage("Time: " . $level->getTime());
$sender->sendMessage("Tick-rate: " . $level->getTickRate());
$sender->sendMessage("Tick-rate-time: " . $level->getTickRateTime());
$sender->sendMessage("Seed: " . $level->getSeed());
$sender->sendMessage("Is-auto-saving: " . ($level->getAutoSave() ? TextFormat::GREEN . "yes" : TextFormat::RED . "no"));
$sender->sendMessage("Is-generated: " . ($level->getServer()->isLevelGenerated($level->getName()) ? TextFormat::GREEN . "yes" : TextFormat::RED . "no"));
$sender->sendMessage("Is-loaded: " . ($level->getServer()->isLevelLoaded($level->getName()) ? TextFormat::GREEN . "yes" : TextFormat::RED . "no"));
}