getFolderName() public method

Returns the Level folder name
public getFolderName ( ) : string
return string
示例#1
0
 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
0
 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
0
 /**
  * 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
0
 public function locationHash()
 {
     return floor($this->x) . ":" . floor($this->y) . ":" . floor($this->z) . ($this->level === null ? "" : strtolower($this->level->getFolderName()));
 }
示例#5
-1
 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();
 }