当前位置: 首页>>代码示例>>PHP>>正文


PHP Level::getFolderName方法代码示例

本文整理汇总了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");
 }
开发者ID:xHFx,项目名称:ImagicalMine,代码行数:28,代码来源:LevelTimings.php

示例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;
     }
 }
开发者ID:organization,项目名称:AutoGrow,代码行数:17,代码来源:AutoGrow.php

示例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;
     }
 }
开发者ID:ZenaGamingsky,项目名称:PocketBox,代码行数:13,代码来源:Server.php

示例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();
 }
开发者ID:SuperAdam47,项目名称:BedWarsPE,代码行数:18,代码来源:BedWars.php

示例5: locationHash

 public function locationHash()
 {
     return floor($this->x) . ":" . floor($this->y) . ":" . floor($this->z) . ($this->level === null ? "" : strtolower($this->level->getFolderName()));
 }
开发者ID:robozeri,项目名称:Yuriko-MP,代码行数:4,代码来源:Position.php


注:本文中的pocketmine\level\Level::getFolderName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。