本文整理汇总了PHP中pocketmine\level\Level::getFolderName方法的典型用法代码示例。如果您正苦于以下问题:PHP Level::getFolderName方法的具体用法?PHP Level::getFolderName怎么用?PHP Level::getFolderName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pocketmine\level\Level
的用法示例。
在下文中一共展示了Level::getFolderName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(Level $level)
{
$name = $level->getFolderName() . " - ";
$this->mobSpawn = new TimingsHandler("** " . $name . "mobSpawn");
$this->doChunkUnload = new TimingsHandler("** " . $name . "doChunkUnload");
$this->doTickPending = new TimingsHandler("** " . $name . "doTickPending");
$this->doTickTiles = new TimingsHandler("** " . $name . "doTickTiles");
$this->doVillages = new TimingsHandler("** " . $name . "doVillages");
$this->doChunkMap = new TimingsHandler("** " . $name . "doChunkMap");
$this->doSounds = new TimingsHandler("** " . $name . "doSounds");
$this->doChunkGC = new TimingsHandler("** " . $name . "doChunkGC");
$this->doPortalForcer = new TimingsHandler("** " . $name . "doPortalForcer");
$this->entityTick = new TimingsHandler("** " . $name . "entityTick");
$this->tileEntityTick = new TimingsHandler("** " . $name . "tileEntityTick");
$this->tileEntityPending = new TimingsHandler("** " . $name . "tileEntityPending");
$this->syncChunkSendTimer = new TimingsHandler("** " . $name . "syncChunkSend");
$this->syncChunkSendPrepareTimer = new TimingsHandler("** " . $name . "syncChunkSendPrepare");
$this->syncChunkLoadTimer = new TimingsHandler("** " . $name . "syncChunkLoad");
$this->syncChunkLoadDataTimer = new TimingsHandler("** " . $name . "syncChunkLoad - Data");
$this->syncChunkLoadStructuresTimer = new TimingsHandler("** " . $name . "syncChunkLoad - Structures");
$this->syncChunkLoadEntitiesTimer = new TimingsHandler("** " . $name . "syncChunkLoad - Entities");
$this->syncChunkLoadTileEntitiesTimer = new TimingsHandler("** " . $name . "syncChunkLoad - TileEntities");
$this->syncChunkLoadTileTicksTimer = new TimingsHandler("** " . $name . "syncChunkLoad - TileTicks");
$this->syncChunkLoadPostTimer = new TimingsHandler("** " . $name . "syncChunkLoad - Post");
$this->tracker = new TimingsHandler($name . "tracker");
$this->doTick = new TimingsHandler($name . "doTick");
$this->tickEntities = new TimingsHandler($name . "tickEntities");
}
示例2: loadData
public function loadData(Level $level)
{
if (!isset($this->randomTickBlocks[$levelName = $level->getFolderName()])) {
$this->chunksPerTickProperty->setValue($level, -1);
$this->randomTickBlocks[$levelName] = array_keys($this->randomTickBlocksProperty->getValue($level));
@mkdir($folder = $level->getProvider()->getPath());
if (!file_exists($path = $folder . "AutoGrowBlocks.sl")) {
file_put_contents($path, serialize([]));
}
$blocks = [];
foreach (unserialize(file_get_contents($path)) as $posKey) {
$pos = explode(":", $posKey);
$blocks[$posKey] = new Position($pos[0], $pos[1], $pos[2], $level);
}
$this->levelTickBlocks[$levelName] = $blocks;
}
}
示例3: setDefaultLevel
/**
* Sets the default level to a different level
* This won't change the level-name property,
* it only affects the server on runtime
*
* @param Level $level
*/
public function setDefaultLevel($level)
{
if ($level === null or $this->isLevelLoaded($level->getFolderName()) and $level !== $this->levelDefault) {
$this->levelDefault = $level;
}
}
示例4: Config
function __construct(Level $Level, BedWars $plugin)
{
$this->Level = $Level;
$this->plugin = $plugin;
$this->LevelData = (new Config($plugin->getDataFolder() . "levels/" . $Level->getFolderName() . ".yml"))->getAll();
$this->level_name = $Level->getFolderName();
$this->PopupInfo = new PopupInfo($this->plugin, $Level, 1);
$this->PopupInfo->Rows = array();
foreach ($this->LevelData["teams"] as $name => $team) {
/*$this->PopupInfo->Rows[$name] = "[".$this->plugin->teamColorName($name)."] = 0";*/
}
$this->PopupInfo2 = new PopupInfo($this->plugin, $Level, 0);
$this->PopupInfo2->PlayersData = array();
$Level->setAutoSave(false);
$Level->setTime(6000);
$Level->stopTime();
$this->initBlocks();
}
示例5: locationHash
public function locationHash()
{
return floor($this->x) . ":" . floor($this->y) . ":" . floor($this->z) . ($this->level === null ? "" : strtolower($this->level->getFolderName()));
}