Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

namespace pocketmine; use pocketmine\block\Block; use pocketmine\command\CommandReader; us..

Decoded Output download

<?  namespace pocketmine; use pocketmine\block\Block; use pocketmine\command\CommandReader; use pocketmine\command\CommandSender; use pocketmine\command\ConsoleCommandSender; use pocketmine\command\PluginIdentifiableCommand; use pocketmine\command\SimpleCommandMap; use pocketmine\entity\{Entity, ArmorStand, BlazeFireball, Boat, Camera, Car, Chalkboard, Item as DroppedItem, EnderCrystal, EnderPearl, FallingSand, FishingHook, FloatingText, GhastFireball, LeashKnot, Lightning, Minecart, MinecartChest, MinecartCommandBlock, MinecartHopper, MinecartTNT, NPCHuman, Painting, PrimedTNT, ShulkerBullet, XPOrb, Human, Dragon, Endermite, EvocationFangs, Giant, Guardian, LearnToCodeMascot, PolarBear, Shulker, Slime, SkeletonHorse, Squid, Vindicator, Witch, Wither, WitherSkeleton, ZombieHorse}; use pocketmine\entity\animal\walking\{Chicken, Cow, Donkey, Horse, Llama, Mooshroom, Mule, Ocelot, Pig, Rabbit, Sheep, Villager}; use pocketmine\entity\animal\flying\{Bat, Parrot}; use pocketmine\entity\monster\flying\{Blaze, Ghast, Vex}; use pocketmine\entity\monster\jumping\MagmaCube; use pocketmine\entity\monster\walking\{CaveSpider, Creeper, Enderman, Husk, IronGolem, PigZombie, Silverfish, Skeleton, SnowGolem, Spider, Stray, Wolf, Zombie, ZombieVillager}; use pocketmine\entity\{Egg, FireBall}; use pocketmine\entity\Arrow; use pocketmine\entity\Snowball; use pocketmine\entity\SplashPotion; use pocketmine\entity\Koni; use pocketmine\event\HandlerList; use pocketmine\event\level\LevelInitEvent; use pocketmine\event\level\LevelLoadEvent; use pocketmine\event\server\ServerCommandEvent; use pocketmine\event\Timings; use pocketmine\event\TimingsHandler; use pocketmine\inventory\CraftingManager; use pocketmine\inventory\InventoryType; use pocketmine\inventory\Recipe; use pocketmine\inventory\ShapedRecipe; use pocketmine\inventory\ShapelessRecipe; use pocketmine\inventory\FurnaceRecipe; use pocketmine\item\enchantment\Enchantment; use pocketmine\item\Item; use pocketmine\level\format\anvil\Anvil; use pocketmine\level\format\pmanvil\PMAnvil; use pocketmine\level\format\LevelProviderManager; use pocketmine\level\format\mcregion\McRegion; use pocketmine\level\generator\Generator; use pocketmine\level\Level; use pocketmine\metadata\EntityMetadataStore; use pocketmine\metadata\LevelMetadataStore; use pocketmine\metadata\PlayerMetadataStore; use pocketmine\mods\ModsManager; use pocketmine\nbt\NBT; use pocketmine\nbt\tag\ByteTag; use pocketmine\nbt\tag\Compound; use pocketmine\nbt\tag\DoubleTag; use pocketmine\nbt\tag\Enum; use pocketmine\nbt\tag\FloatTag; use pocketmine\nbt\tag\IntTag; use pocketmine\nbt\tag\LongTag; use pocketmine\nbt\tag\ShortTag; use pocketmine\nbt\tag\StringTag; use pocketmine\network\Network; use pocketmine\network\protocol\BatchPacket; use pocketmine\network\protocol\CraftingDataPacket; use pocketmine\network\protocol\DataPacket; use pocketmine\network\protocol\PlayerListPacket; use pocketmine\network\query\QueryHandler; use pocketmine\network\RakLibInterface; use pocketmine\network\rcon\RCON; use pocketmine\network\SourceInterface; use pocketmine\network\upnp\UPnP; use pocketmine\permission\BanList; use pocketmine\permission\DefaultPermissions; use pocketmine\plugin\PharPluginLoader; use pocketmine\plugin\Plugin; use pocketmine\plugin\PluginLoadOrder; use pocketmine\plugin\PluginManager; use pocketmine\scheduler\CallbackTask; use pocketmine\scheduler\GarbageCollectionTask; use pocketmine\scheduler\ServerScheduler; use pocketmine\tile\Bed; use pocketmine\tile\Cauldron; use pocketmine\tile\Chest; use pocketmine\tile\Dispenser; use pocketmine\tile\Dropper; use pocketmine\entity\Effect; use pocketmine\tile\Hopper; use pocketmine\tile\EnchantTable; use pocketmine\tile\EnderChest; use pocketmine\tile\FlowerPot; use pocketmine\tile\Furnace; use pocketmine\tile\PistonArm; use pocketmine\tile\ItemFrame; use pocketmine\tile\Sign; use pocketmine\tile\Skull; use pocketmine\tile\Tile; use pocketmine\utils\Binary; use pocketmine\utils\Cache; use pocketmine\utils\Config; use pocketmine\utils\LevelException; use pocketmine\utils\MainLogger; use pocketmine\utils\ServerException; use pocketmine\utils\TextFormat; use pocketmine\utils\TextWrapper; use pocketmine\utils\Utils; use pocketmine\utils\UUID; use pocketmine\utils\VersionString; use pocketmine\network\protocol\Info; use pocketmine\level\generator\biome\Biome; use pocketmine\scheduler\FileWriteTask; use pocketmine\utils\MetadataConvertor; use pocketmine\event\server\SendRecipiesList; use pocketmine\network\protocol\PEPacket; use pocketmine\tile\Beacon; class Server { const u8t7G = "pocketmine.broadcast.admin"; const Clx6i = "pocketmine.broadcast.user"; private static $instance = null; private static $serverId = 0; private $banByName = null; private $banByIP = null; private $operators = null; private $whitelist = null; private $isRunning = true; private $hasStopped = false; private $pluginManager = null; private $scheduler = null; private $tickCounter; private $nextTick = 0; private $tickAverage = array(20, 20, 20, 20, 20); private $useAverage = array(20, 20, 20, 20, 20); private $logger; private $console = null; private $commandMap = null; private $craftingManager; private $consoleSender; private $maxPlayers; private $autoSave; private $autoGenerate; private $savePlayerData; private $rcon; private $entityMetadata; private $playerMetadata; private $levelMetadata; private $network; public $networkCompressionLevel = 7; private $serverID; private $autoloader; private $filePath; private $dataPath; private $pluginPath; private $queryHandler; private $properties; private $config; private $softConfig; private $players = array(); private $playerList = array(); private $identifiers = array(); private $levels = array(); private $levelDefault = null; private $useAnimal; private $animalLimit; private $useMonster; private $monsterLimit; public $packetMaker = null; private $jsonCommands = array(); private $spawnedEntity = array(); private $unloadLevelQueue = array(); private $serverPublicKey = ''; private $serverPrivateKey = ''; private $serverToken = 'hksdYI3has'; private $isUseEncrypt = false; private $modsManager = null; public function addSpawnedEntity($entity) { if ($entity instanceof Player) { return; } $this->spawnedEntity[$entity->getId()] = $entity; } public function removeSpawnedEntity($entity) { unset($this->spawnedEntity[$entity->getId()]); } public function isUseAnimal() { return $this->useAnimal; } public function getAnimalLimit() { return $this->animalLimit; } public function isUseMonster() { return $this->useMonster; } public function getMonsterLimit() { return $this->monsterLimit; } public function getName() { return "BombaCore"; } public function isRunning() { return $this->isRunning === true; } public function getPocketMineVersion() { return \pocketmine\VERSION; } public function getCodename() { return \pocketmine\CODENAME; } public function getVersion() { return \pocketmine\MINECRAFT_VERSION; } public function getApiVersion() { return \pocketmine\API_VERSION; } public function getFilePath() { return $this->filePath; } public function getDataPath() { return $this->dataPath; } public function getPluginPath() { return $this->pluginPath; } public function getMaxPlayers() { return $this->maxPlayers; } public function getPort() { return $this->getConfigInt("server-port", 19132); } public function getViewDistance() { return 96; } public function getIp() { return $this->getConfigString("server-ip", "0.0.0.0"); } public function getServerName() { return $this->getConfigString("motd", "Minecraft: PE Server"); } public function getAutoSave() { return $this->autoSave; } public function setAutoSave($value) { $this->autoSave = (bool) $value; foreach ($this->getLevels() as $level) { $level->setAutoSave($this->autoSave); } } public function getAutoGenerate() { return $this->autoGenerate; } public function setAutoGenerate($value) { $this->autoGenerate = (bool) $value; } public function getSavePlayerData() { return $this->savePlayerData; } public function setSavePlayerData($value) { $this->savePlayerData = (bool) $value; } public function getLevelType() { return $this->getConfigString("level-type", "DEFAULT"); } public function getGenerateStructures() { return $this->getConfigBoolean("generate-structures", true); } public function getGamemode() { return $this->getConfigInt("gamemode", 0) & 0b11; } public function getForceGamemode() { return $this->getConfigBoolean("force-gamemode", false); } public static function getGamemodeString($mode) { switch ((int) $mode) { case Player::dVmA3: return "SURVIVAL"; case Player::mwgfq: return "CREATIVE"; case Player::O1PmP: return "ADVENTURE"; case Player::aMcFa: return "SPECTATOR"; } return "UNKNOWN"; } public static function getGamemodeFromString($str) { switch (strtolower(trim($str))) { case (string) Player::dVmA3: case "survival": case "s": return Player::dVmA3; case (string) Player::mwgfq: case "creative": case "c": return Player::mwgfq; case (string) Player::O1PmP: case "adventure": case "a": return Player::O1PmP; case (string) Player::aMcFa: case "spectator": case "view": case "v": return Player::aMcFa; } return -1; } public static function getDifficultyFromString($str) { switch (strtolower(trim($str))) { case "0": case "peaceful": case "p": return 0; case "1": case "easy": case "e": return 1; case "2": case "normal": case "n": return 2; case "3": case "hard": case "h": return 3; } return -1; } public function findEntity(int $entityId, Level $expectedLevel = \null) { goto M2Lfq; ziIYi: foreach ($levels as $level) { \assert(!$level->isClosed()); if (($entity = $level->getEntity($entityId)) instanceof Entity) { return $entity; } } goto OZXwm; M2Lfq: $levels = $this->levels; goto rDKrM; OZXwm: return \null; goto BSV5g; rDKrM: if ($expectedLevel !== \null) { \array_unshift($levels, $expectedLevel); } goto ziIYi; BSV5g: } public function getDifficulty() { return $this->getConfigInt("difficulty", 1); } public function hasWhitelist() { return $this->getConfigBoolean("white-list", false); } public function getSpawnRadius() { return $this->getConfigInt("spawn-protection", 16); } public function getAllowFlight() { return $this->getConfigBoolean("allow-flight", false); } public function isHardcore() { return $this->getConfigBoolean("hardcore", false); } public function getDefaultGamemode() { return $this->getConfigInt("gamemode", 0) & 0b11; } public function getMotd() { return $this->getConfigString("motd", "Minecraft: PE Server"); } public function getLoader() { return $this->autoloader; } public function getLogger() { return $this->logger; } public function getEntityMetadata() { return $this->entityMetadata; } public function getPlayerMetadata() { return $this->playerMetadata; } public function getLevelMetadata() { return $this->levelMetadata; } public function getPluginManager() { return $this->pluginManager; } public function getCraftingManager() { return $this->craftingManager; } public function getScheduler() { return $this->scheduler; } public function getModsManager() { return $this->modsManager; } public function getTick() { return $this->tickCounter; } public function getTicksPerSecond() { return round(array_sum($this->tickAverage) / count($this->tickAverage), 2); } public function getTickUsage() { return round(array_sum($this->useAverage) / count($this->useAverage) * 100, 2); } public function blockAddress($address, $timeout = 300) { $this->network->blockAddress($address, $timeout); } public function sendPacket($address, $port, $payload) { $this->network->sendPacket($address, $port, $payload); } public function getInterfaces() { return $this->network->getInterfaces(); } public function addInterface(SourceInterface $interface) { $this->network->registerInterface($interface); } public function removeInterface(SourceInterface $interface) { $interface->shutdown(); $this->network->unregisterInterface($interface); } public function getCommandMap() { return $this->commandMap; } public function getOnlinePlayers() { return $this->playerList; } public function addRecipe(Recipe $recipe) { $this->craftingManager->registerRecipe($recipe); } public function getOfflinePlayer($name) { goto PBMIx; PBMIx: $name = strtolower($name); goto TRojf; gn9a3: if ($result === null) { $result = new OfflinePlayer($this, $name); } goto BvRsJ; TRojf: $result = $this->getPlayerExact($name); goto gn9a3; BvRsJ: return $result; goto BjVeH; BjVeH: } public function getOfflinePlayerData($name) { goto dj8KI; wpUxb: $spawn = $this->getDefaultLevel()->getSafeSpawn(); goto PL3om; DCKCU: $nbt->EnderChestInventory->setTagType(NBT::GAWey); goto i1n62; dj8KI: $name = strtolower($name); goto Iw0ZT; EFG6g: $nbt->Inventory->setTagType(NBT::GAWey); goto DCKCU; JAz8Y: return $nbt; goto hzWDE; Iw0ZT: $path = $this->getDataPath() . "players/"; goto K0g9d; uFWl4: $nbt->Rotation->setTagType(NBT::RTOEd); goto JAz8Y; PL3om: $nbt = new Compound("", [new LongTag("firstPlayed", floor(microtime(true) * 1000)), new LongTag("lastPlayed", floor(microtime(true) * 1000)), new Enum("Pos", [new DoubleTag(0, $spawn->x), new DoubleTag(1, $spawn->y), new DoubleTag(2, $spawn->z)]), new StringTag("Level", $this->getDefaultLevel()->getName()), new Enum("Inventory", []), new Enum("EnderChestInventory", []), new Compound("Achievements", []), new IntTag("playerGameType", $this->getGamemode()), new Enum("Motion", [new DoubleTag(0, 0.0), new DoubleTag(1, 0.0), new DoubleTag(2, 0.0)]), new Enum("Rotation", [new FloatTag(0, 0.0), new FloatTag(1, 0.0)]), new FloatTag("FallDistance", 0.0), new ShortTag("Fire", 0), new ShortTag("Air", 300), new ByteTag("OnGround", 1), new ByteTag("Invulnerable", 0), new StringTag("NameTag", $name)]); goto CcfPH; K0g9d: if (file_exists($path . "{$name}.dat")) { try { goto Wo4US; FsyyD: return $nbt->getData(); goto kL9ZN; Wo4US: $nbt = new NBT(NBT::vFj_z); goto IreT1; IreT1: $nbt->readCompressed(file_get_contents($path . "{$name}.dat")); goto FsyyD; kL9ZN: } catch (\Exception $e) { rename($path . "{$name}.dat", $path . "{$name}.dat.bak"); $this->logger->warning("Corrupted data found for \"" . $name . "\", creating new profile"); } } else { $this->logger->notice("Player data not found for \"" . $name . "\", creating new profile"); } goto wpUxb; i1n62: $nbt->Motion->setTagType(NBT::moO6e); goto uFWl4; CcfPH: $nbt->Pos->setTagType(NBT::moO6e); goto EFG6g; hzWDE: } public function saveOfflinePlayerData($name, Compound $nbtTag, $async = false) { $nbt = new NBT(NBT::vFj_z); try { $nbt->setData($nbtTag); if ($async) { $this->getScheduler()->scheduleAsyncTask(new FileWriteTask($this->getDataPath() . "players/" . strtolower($name) . ".dat", $nbt->writeCompressed())); } else { file_put_contents($this->getDataPath() . "players/" . strtolower($name) . ".dat", $nbt->writeCompressed()); } } catch (\Exception $e) { $this->logger->critical("Could not save player " . $name . ": " . $e->getMessage()); if (\pocketmine\DEBUG > 1 and $this->logger instanceof MainLogger) { $this->logger->logException($e); } } } public function getPlayer($name) { goto Zo93X; LyFij: $name = strtolower($name); goto X34YZ; Zo93X: $found = null; goto LyFij; X34YZ: $delta = PHP_INT_MAX; goto zXf2T; zXf2T: foreach ($this->getOnlinePlayers() as $player) { $playerName = strtolower($player->getName()); if (strpos($playerName, $name) === 0) { goto ySzmF; ySzmF: $curDelta = strlen($playerName) - strlen($name); goto kKX2f; FLtzy: if ($curDelta == 0) { break; } goto ZiCbT; kKX2f: if ($curDelta < $delta) { $found = $player; $delta = $curDelta; } goto FLtzy; ZiCbT: } } goto ezMFS; ezMFS: return $found; goto Exmdl; Exmdl: } public function getPlayerExact($name) { goto B3WOq; B3WOq: $name = strtolower($name); goto u2DWG; q32VT: return null; goto anLwp; u2DWG: foreach ($this->getOnlinePlayers() as $player) { if (strtolower($player->getName()) === $name) { return $player; } } goto q32VT; anLwp: } public function matchPlayer($partialName) { goto vRUoN; bi37o: foreach ($this->getOnlinePlayers() as $player) { $playerName = strtolower($player->getName()); if ($playerName === $partialName) { $matchedPlayers = [$player]; break; } else { if (strpos($playerName, $partialName) !== false) { $matchedPlayers[] = $player; } } } goto wVQUE; wVQUE: return $matchedPlayers; goto XW6Ux; vRUoN: $partialName = strtolower($partialName); goto Kr7rg; Kr7rg: $matchedPlayers = []; goto bi37o; XW6Ux: } public function removePlayer(Player $player) { if (isset($this->identifiers[$hash = spl_object_hash($player)])) { goto byk9d; zQh0i: unset($this->identifiers[$hash]); goto aMOQ3; byk9d: $identifier = $this->identifiers[$hash]; goto MXjgF; MXjgF: unset($this->players[$identifier]); goto zQh0i; aMOQ3: return; goto GhUFw; GhUFw: } foreach ($this->players as $identifier => $p) { if ($player === $p) { goto NDH25; NDH25: unset($this->players[$identifier]); goto adExB; xZSTV: break; goto VOeUh; adExB: unset($this->identifiers[spl_object_hash($player)]); goto xZSTV; VOeUh: } } } public function getLevels() { return $this->levels; } public function getDefaultLevel() { return $this->levelDefault; } public function setDefaultLevel($level) { if ($level === null or $this->isLevelLoaded($level->getFolderName()) and $level !== $this->levelDefault) { $this->levelDefault = $level; } } public function isLevelLoaded($name) { return $this->getLevelByName($name) instanceof Level; } public function getLevel($levelId) { if (isset($this->levels[$levelId])) { return $this->levels[$levelId]; } return null; } public function getLevelByName($name) { foreach ($this->getLevels() as $level) { if ($level->getFolderName() === $name) { return $level; } } return null; } public function unloadLevel(Level $level, $forceUnload = false, $direct = false) { if ($direct) { if ($level->unload($forceUnload) === true) { unset($this->levels[$level->getId()]); return true; } } else { $this->unloadLevelQueue[$level->getId()] = ['level' => $level, 'force' => $forceUnload]; } return false; } public function loadLevel($name) { goto mgMLI; mJEBy: if ($this->isLevelLoaded($name)) { return true; } elseif (!$this->isLevelGenerated($name)) { $this->logger->notice("Level \"" . $name . "\" not found"); return false; } goto IQwnY; dHbkC: if ($provider === null) { $this->logger->error("Could not load level \"" . $name . "\": Unknown provider"); return false; } goto QPF16; hJQ1j: return true; goto oypUn; qmV8Z: $provider = LevelProviderManager::getProvider($path); goto dHbkC; QPF16: try { $level = new Level($this, $name, $path, $provider); } catch (\Exception $e) { goto dz5D8; cSu6i: return false; goto K6PD5; elR7f: if ($this->logger instanceof MainLogger) { $this->logger->logException($e); } goto cSu6i; dz5D8: $this->logger->error("Could not load level \"" . $name . "\": " . $e->getMessage()); goto elR7f; K6PD5: } goto g0AGE; go43f: $this->getPluginManager()->callEvent(new LevelLoadEvent($level)); goto hJQ1j; g0AGE: $this->levels[$level->getId()] = $level; goto zxzhV; zxzhV: $level->initLevel(); goto go43f; mgMLI: if (trim($name) === "") { throw new LevelException("Invalid empty level name"); } goto mJEBy; IQwnY: $path = $this->getDataPath() . "worlds/" . $name . "/"; goto qmV8Z; oypUn: } public function generateLevel($name, $seed = null, $options = array()) { goto C7pIG; hm2LV: if (($provider = LevelProviderManager::getProviderByName($providerName = $this->getProperty("level-settings.default-format", "mcregion"))) === null) { $provider = LevelProviderManager::getProviderByName($providerName = "mcregion"); } goto VOoJI; CLR_R: $this->getPluginManager()->callEvent(new LevelLoadEvent($level)); goto Ibo_7; Ibo_7: if ($this->getAutoGenerate()) { goto KbNEH; FHlTC: asort($order); goto km62H; V8F4j: $order = []; goto lelC9; KbNEH: $centerX = $level->getSpawnLocation()->getX() >> 4; goto EThnc; km62H: foreach ($order as $index => $distance) { Level::getXZ($index, $chunkX, $chunkZ); $level->generateChunk($chunkX, $chunkZ, true); } goto nGM2u; EThnc: $centerZ = $level->getSpawnLocation()->getZ() >> 4; goto V8F4j; lelC9: for ($X = -3; $X <= 3; ++$X) { for ($Z = -3; $Z <= 3; ++$Z) { $distance = $X ** 2 + $Z ** 2; $chunkX = $X + $centerX; $chunkZ = $Z + $centerZ; $index = Level::chunkHash($chunkX, $chunkZ); $order[$index] = $distance; } } goto FHlTC; nGM2u: } goto hSnYH; C7pIG: if (trim($name) === "" or $this->isLevelGenerated($name)) { return false; } goto hodFP; hSnYH: return true; goto F3hjJ; hodFP: $seed = $seed === null ? Binary::readInt(@Utils::getRandomBytes(4, false)) : (int) $seed; goto hm2LV; VOoJI: try { goto BzSMk; AgPPA: $this->levels[$level->getId()] = $level; goto XP2NI; Kr3ZT: $level = new Level($this, $name, $path, $provider); goto AgPPA; XP2NI: $level->initLevel(); goto QnoSH; BzSMk: $path = $this->getDataPath() . "worlds/" . $name . "/"; goto YLIix; YLIix: $provider::generate($path, $name, $seed, $options); goto Kr3ZT; QnoSH: } catch (\Exception $e) { goto nwYNT; nwYNT: $this->logger->error("Could not generate level \"" . $name . "\": " . $e->getMessage()); goto gQ4Uf; aWgE0: return false; goto zueLO; gQ4Uf: if ($this->logger instanceof MainLogger) { $this->logger->logException($e); } goto aWgE0; zueLO: } goto wT5Om; wT5Om: $this->getPluginManager()->callEvent(new LevelInitEvent($level)); goto CLR_R; F3hjJ: } public function isLevelGenerated($name) { goto Cdcgn; Cdcgn: if (trim($name) === "") { return false; } goto Jp_24; IsWC7: return true; goto dfJe7; W3dFP: if (!$this->getLevelByName($name) instanceof Level) { if (LevelProviderManager::getProvider($path) === null) { return false; } } goto IsWC7; Jp_24: $path = $this->getDataPath() . "worlds/" . $name . "/"; goto W3dFP; dfJe7: } public function getConfigString($variable, $defaultValue = "") { goto sQQ_R; H060U: return $this->properties->exists($variable) ? $this->properties->get($variable) : $defaultValue; goto z8QC3; a9794: if (isset($v[$variable])) { return (string) $v[$variable]; } goto H060U; sQQ_R: $v = getopt("", ["{$variable}::"]); goto a9794; z8QC3: } public function getAdvancedProperty($variable, $defaultValue = null) { goto XWwcu; Mj3c1: while (count($vars) > 0) { $baseKey = array_shift($vars); if (is_array($base) and isset($base[$baseKey])) { $base = $base[$baseKey]; } else { return $defaultValue; } } goto wfhAl; NC3eV: $base = array_shift($vars); goto rw2Ek; rw2Ek: if ($this->softConfig->exists($base)) { $base = $this->softConfig->get($base); } else { return $defaultValue; } goto Mj3c1; XWwcu: $vars = explode(".", $variable); goto NC3eV; wfhAl: return $base; goto pEG0Z; pEG0Z: } public function getProperty($variable, $defaultValue = null) { $value = $this->config->getNested($variable); return $value === null ? $defaultValue : $value; } public function setConfigString($variable, $value) { $this->properties->set($variable, $value); } public function getConfigInt($variable, $defaultValue = 0) { goto fclcx; fclcx: $v = getopt("", ["{$variable}::"]); goto fyzYf; vIYCl: return $this->properties->exists($variable) ? (int) $this->properties->get($variable) : (int) $defaultValue; goto GQIsX; fyzYf: if (isset($v[$variable])) { return (int) $v[$variable]; } goto vIYCl; GQIsX: } public function setConfigInt($variable, $value) { $this->properties->set($variable, (int) $value); } public function getConfigBoolean($variable, $defaultValue = false) { goto AItSp; lxFsz: switch (strtolower($value)) { case "on": case "true": case "1": case "yes": return true; } goto JJsCw; AItSp: $v = getopt("", ["{$variable}::"]); goto ciWSG; ciWSG: if (isset($v[$variable])) { $value = $v[$variable]; } else { $value = $this->properties->exists($variable) ? $this->properties->get($variable) : $defaultValue; } goto hmgzC; JJsCw: return false; goto JdaBP; hmgzC: if (is_bool($value)) { return $value; } goto lxFsz; JdaBP: } public function setConfigBool($variable, $value) { $this->properties->set($variable, $value == true ? "1" : "0"); } public function getPluginCommand($name) { if (($command = $this->commandMap->getCommand($name)) instanceof PluginIdentifiableCommand) { return $command; } else { return null; } } public function getNameBans() { return $this->banByName; } public function getIPBans() { return $this->banByIP; } public function addOp($name) { goto BUwnv; hbs72: if (($player = $this->getPlayerExact($name)) instanceof Player) { $player->recalculatePermissions(); } goto norn1; norn1: $this->operators->save(); goto y1r_i; BUwnv: $this->operators->set(strtolower($name), true); goto hbs72; y1r_i: } public function removeOp($name) { goto iWER3; iWER3: $this->operators->remove(strtolower($name)); goto oD8os; oD8os: if (($player = $this->getPlayerExact($name)) instanceof Player) { $player->recalculatePermissions(); } goto mRF1s; mRF1s: $this->operators->save(); goto llq3Y; llq3Y: } public function addWhitelist($name) { $this->whitelist->set(strtolower($name), true); $this->whitelist->save(); } public function removeWhitelist($name) { $this->whitelist->remove(strtolower($name)); $this->whitelist->save(); } public function isWhitelisted($name) { return !$this->hasWhitelist() or $this->operators->exists($name, true) or $this->whitelist->exists($name, true); } public function isOp($name) { return $this->operators->exists($name, true); } public function getWhitelisted() { return $this->whitelist; } public function getOps() { return $this->operators; } public function reloadWhitelist() { $this->whitelist->reload(); } public function getCommandAliases() { goto qaVGk; dhrws: if (is_array($section)) { foreach ($section as $key => $value) { goto KbUK9; Sv_ls: $result[$key] = $commands; goto Zc2jG; uViWB: if (is_array($value)) { $commands = $value; } else { $commands[] = $value; } goto Sv_ls; KbUK9: $commands = []; goto uViWB; Zc2jG: } } goto Jm1D3; Jm1D3: return $result; goto gmK79; qaVGk: $section = $this->getProperty("aliases"); goto I78xj; I78xj: $result = []; goto dhrws; gmK79: } public static function getInstance() { return self::$instance; } public static function getServerId() { return self::$serverId; } public function __construct(\ClassLoader $autoloader, \ThreadedLogger $logger, $filePath, $dataPath, $pluginPath) { goto Cus5G; wVl6K: $this->pluginManager->registerInterface(PharPluginLoader::class); goto ZqCH6; jAgAf: PEPacket::initPallet(); goto zBKTd; sX25C: if (!file_exists($this->dataPath . "pocketmine.yml")) { $content = file_get_contents($this->filePath . "src/pocketmine/resources/pocketmine.yml"); @file_put_contents($this->dataPath . "pocketmine.yml", $content); } goto Lk3Pr; XNQ37: $this->scheduler = new ServerScheduler(); goto rmeh0; in4Op: $this->pluginManager->setUseTimings(true); goto wVl6K; IOlI7: $this->banByIP = new BanList($this->dataPath . "banned-ips.txt"); goto KX_LA; EV2K2: $this->softConfig = new Config($this->dataPath . "pocketmine-soft.yml", Config::LUh1u, []); goto Gk2ot; zBKTd: $this->pluginManager = new PluginManager($this, $this->commandMap); goto UjMu6; c6wzO: Biome::init(); goto q92PJ; tiU0N: $this->maxPlayers = $this->getConfigInt("max-players", 20); goto X5WZG; Gk2ot: $this->logger->info("Loading pocketmine.yml..."); goto sX25C; QYIqD: $this->scheduler->scheduleRepeatingTask(new GarbageCollectionTask(), 900); goto R6__i; YwHiD: $this->entityMetadata = new EntityMetadataStore(); goto q2wJa; kE2yo: $this->logger->info("Loading server properties..."); goto d9i3I; ij2aF: $this->isUseEncrypt = $this->getConfigBoolean("use-encrypt", false); goto HexZr; SQRAZ: $this->monsterLimit = $this->getConfigInt("mobs-limit", 0); goto ij2aF; nRjoS: if (file_exists($this->dataPath . "banned.txt") and !file_exists($this->dataPath . "banned-players.txt")) { @rename($this->dataPath . "banned.txt", $this->dataPath . "banned-players.txt"); } goto DY5Ux; DR9m8: $this->logger = $logger; goto GUkO9; J2Im6: $this->logger->info("Starting Minecraft PE server on " . ($this->getIp() === "" ? "*" : $this->getIp()) . ":" . $this->getPort()); goto H_RyC; Xpssw: $this->setAutoGenerate($this->getConfigBoolean("auto-generate", false)); goto lkw0G; S4fVm: Item::init(); goto c6wzO; xADLo: Enchantment::init(); goto S4fVm; nKaoy: if (count($configPlugins) > 0) { goto UxCea; D6P6m: $loadNew = false; goto X6joC; UxCea: $this->getLogger()->info("Checking extra plugins"); goto D6P6m; DxpTM: if ($loadNew) { $this->pluginManager->loadPlugins($this->pluginPath); } goto qjjL5; X6joC: foreach ($configPlugins as $plugin => $download) { if (!isset($plugins[$plugin])) { goto iCzp3; Gdta_: if (substr($download, 0, 4) === "http") { $this->getLogger()->info("Downloading " . $plugin); file_put_contents($path, Utils::getURL($download)); } else { file_put_contents($path, file_get_contents($download)); } goto PBcAB; PBcAB: $loadNew = true; goto dAwQ8; iCzp3: $path = $this->pluginPath . "/" . $plugin . ".phar"; goto Gdta_; dAwQ8: } } goto DxpTM; qjjL5: } goto Fr43z; p2XOp: if ($this->getAdvancedProperty("main.player-shuffle", 0) > 0) { $this->scheduler->scheduleDelayedRepeatingTask(new CallbackTask([$this, "shufflePlayers"]), $this->getAdvancedProperty("main.player-shuffle", 0), $this->getAdvancedProperty("main.player-shuffle", 0)); } goto Uc4Xz; nEYHr: Timings::init(); goto YvV_6; O3UJN: PluginManager::$pluginParentTimer = new TimingsHandler("** Plugins"); goto nEYHr; Cz2aX: Block::init(); goto xADLo; Hyh1v: $this->operators = new Config($this->dataPath . "ops.txt", Config::HPD3J); goto D39Et; Ed1eL: $this->console = new CommandReader(); goto ySvy6; yQLuj: $this->properties->save(); goto l7i6Z; cF07F: $this->useMonster = $this->getConfigBoolean("spawn-mobs", false); goto SQRAZ; k4PCs: $plugins = $this->pluginManager->loadPlugins($this->pluginPath); goto sf1r7; ySvy6: $version = new VersionString($this->getPocketMineVersion()); goto xx1I7; D39Et: $this->whitelist = new Config($this->dataPath . "white-list.txt", Config::HPD3J); goto nRjoS; q2wJa: $this->playerMetadata = new PlayerMetadataStore(); goto m162Z; Xl34l: if (!file_exists($this->dataPath . "pocketmine-soft.yml")) { $content = file_get_contents($this->filePath . "src/pocketmine/resources/pocketmine-soft.yml"); @file_put_contents($this->dataPath . "pocketmine-soft.yml", $content); } goto EV2K2; dgzPb: $this->logger->info("Loading pocketmine-soft.yml..."); goto Xl34l; rmeh0: if ($this->getConfigBoolean("enable-rcon", false) === true) { $this->rcon = new RCON($this, $this->getConfigString("rcon.password", ""), $this->getConfigInt("rcon.port", $this->getPort()), ($ip = $this->getIp()) != "" ? $ip : "0.0.0.0", $this->getConfigInt("rcon.threads", 1), $this->getConfigInt("rcon.clients-per-thread", 50)); } goto YwHiD; MY__9: LevelProviderManager::addProvider($this, Anvil::class); goto ZR1kr; ieB8d: $this->pluginPath = realpath($pluginPath) . DIRECTORY_SEPARATOR; goto Ed1eL; X5WZG: $this->setAutoSave($this->getConfigBoolean("auto-save", true)); goto Xpssw; xx1I7: $this->logger->info("Starting Minecraft: PE server version " . TextFormat::Q4qsa . $this->getVersion()); goto dgzPb; z2Yso: define("pocketmine\\DEBUG", (int) $this->getProperty("debug.level", 1)); goto Nm2VS; d9i3I: $this->properties = new Config($this->dataPath . "server.properties", Config::CsJBK, ["motd" => "Minecraft: PE Server", "server-port" => 19132, "memory-limit" => "256M", "white-list" => false, "spawn-protection" => 16, "max-players" => 20, "allow-flight" => false, "spawn-animals" => true, "animals-limit" => 0, "spawn-mobs" => true, "mobs-limit" => 0, "gamemode" => 0, "force-gamemode" => false, "hardcore" => false, "pvp" => true, "difficulty" => 1, "generator-settings" => "", "level-name" => "world", "level-seed" => "", "level-type" => "DEFAULT", "enable-query" => false, "enable-rcon" => false, "rcon.password" => substr(base64_encode(@Utils::getRandomBytes(20, false)), 3, 10), "auto-save" => true, "auto-generate" => false, "save-player-data" => false, "time-update" => true, "use-encrypt" => false]); goto t4uu2; G2UU3: $this->network = new Network($this); goto Qtxgj; Qtxgj: $this->network->setName($this->getMotd()); goto CYNzT; O7iBw: MetadataConvertor::init(); goto xoYBx; FMgIi: $this->serverID = Utils::getMachineUniqueId($this->getIp() . $this->getPort()); goto Uswod; wCvpY: $this->autoloader = $autoloader; goto DR9m8; KX_LA: $this->banByIP->load(); goto tiU0N; H_RyC: define("BOOTUP_RANDOM", @Utils::getRandomBytes(16)); goto FMgIi; wZTHu: self::$serverId = mt_rand(0, PHP_INT_MAX); goto wCvpY; W0any: Level::$COMPRESSION_LEVEL = $this->getProperty("chunk-sending.compression-level", 8); goto gCRvM; J2Sgp: $this->animalLimit = $this->getConfigInt("animals-limit", 0); goto cF07F; A9TKB: register_shutdown_function([$this, "crashDump"]); goto k4PCs; CYNzT: if ($this->getConfigBoolean("hardcore", false) === true and $this->getDifficulty() < 3) { $this->setConfigInt("difficulty", 3); } goto z2Yso; cqXjg: $this->scheduler->scheduleDelayedRepeatingTask(new CallbackTask([Cache::class, "cleanup"]), $this->getProperty("ticks-per.cache-cleanup", 900), $this->getProperty("ticks-per.cache-cleanup", 900)); goto DegKE; kdzfk: $this->registerTiles(); goto BYJdO; ARFNt: if ($this->getProperty("chunk-gc.period-in-ticks", 600) > 0) { $this->scheduler->scheduleDelayedRepeatingTask(new CallbackTask([$this, "doLevelGC"]), $this->getProperty("chunk-gc.period-in-ticks", 600), $this->getProperty("chunk-gc.period-in-ticks", 600)); } goto QYIqD; E7Nti: if (!file_exists($pluginPath)) { mkdir($pluginPath, 0777); } goto MM1W4; GUkO9: $this->filePath = $filePath; goto ypOaJ; yJOA1: $this->logger->info("This server is running " . $this->getName() . " version " . ($version->isDev() ? TextFormat::XA1_a : "") . $version->get(true) . TextFormat::y1oxK . " \"" . $this->getCodename() . "\" (API " . $this->getApiVersion() . ")"); goto QX0aI; Ky6sp: LevelProviderManager::addProvider($this, McRegion::class); goto ZOrTz; Lk3Pr: $this->config = new Config($this->dataPath . "pocketmine.yml", Config::LUh1u, []); goto kE2yo; xoYBx: $this->craftingManager = new CraftingManager(); goto jAgAf; ZR1kr: LevelProviderManager::addProvider($this, PMAnvil::class); goto Ky6sp; yR9Fn: $this->commandMap = new SimpleCommandMap($this); goto AfbhS; Fr43z: $this->enablePlugins(PluginLoadOrder::KIqJk); goto MY__9; ZOrTz: foreach ((array) $this->getProperty("worlds", []) as $name => $worldSetting) { if ($this->loadLevel($name) === false) { goto POrrk; IG1wT: $options = explode(":", $this->getProperty("worlds.{$name}.generator", Generator::getGenerator("default"))); goto UG5K9; UG5K9: if (count($options) > 0) { $options = ["preset" => implode(":", $options)]; } else { $options = []; } goto UBWat; UBWat: $this->generateLevel($name, $seed, $options); goto GcUht; POrrk: $seed = $this->getProperty("worlds.{$name}.seed", time()); goto IG1wT; GcUht: } } goto FHdxt; Nm2VS: if ($this->logger instanceof MainLogger) { $this->logger->setLogDebug(\pocketmine\DEBUG > 1); } goto W0any; UjMu6: $this->pluginManager->subscribeToPermission(Server::u8t7G, $this->consoleSender); goto in4Op; FHdxt: if ($this->getDefaultLevel() === null) { goto FUk38; CJWCe: if (trim($default) == "") { goto cW9m1; oISTt: $this->setConfigString("level-name", "world"); goto Bfwy4; FecMR: $default = "world"; goto oISTt; cW9m1: $this->getLogger()->warning("level-name cannot be null, using default"); goto FecMR; Bfwy4: } goto jrmi3; nqvBj: $this->setDefaultLevel($this->getLevelByName($default)); goto NcL0A; jrmi3: if ($this->loadLevel($default) === false) { $seed = $this->getConfigInt("level-seed", time()); $this->generateLevel($default, $seed === 0 ? time() : $seed); } goto nqvBj; FUk38: $default = $this->getConfigString("level-name", "world"); goto CJWCe; NcL0A: } goto yQLuj; ZqCH6: \set_exception_handler([$this, "exceptionHandler"]); goto A9TKB; lkw0G: $this->setSavePlayerData($this->getConfigBoolean("save-player-data", false)); goto wjaMj; m162Z: $this->levelMetadata = new LevelMetadataStore(); goto Hyh1v; l7i6Z: if (!$this->getDefaultLevel() instanceof Level) { goto fnahG; bLumK: return; goto QHxgd; fnahG: $this->getLogger()->emergency("No default level has been loaded"); goto BM_CI; BM_CI: $this->forceShutdown(); goto bLumK; QHxgd: } goto cqXjg; HexZr: if (($memory = str_replace("B", "", strtoupper($this->getConfigString("memory-limit", "256M")))) !== false) { goto l_V56; OcTB8: @ini_set("memory_limit", $memory); goto ABMUr; jjitY: $real = (int) substr($memory, 0, -1) * $value[substr($memory, -1)]; goto FkkRd; l_V56: $value = ["M" => 1, "G" => 1024]; goto jjitY; FkkRd: if ($real < 128) { $this->logger->warning($this->getName() . " may not work right with less than 128MB of RAM"); } goto OcTB8; ABMUr: } else { $this->setConfigString("memory-limit", "256M"); } goto G2UU3; AfbhS: $this->registerEntities(); goto kdzfk; sf1r7: $configPlugins = $this->getAdvancedProperty("plugins", []); goto nKaoy; JuFj9: $this->start(); goto WWi1A; DegKE: if ($this->getAutoSave() and $this->getProperty("ticks-per.autosave", 6000) > 0) { $this->scheduler->scheduleDelayedRepeatingTask(new CallbackTask([$this, "doAutoSave"]), $this->getProperty("ticks-per.autosave", 6000), $this->getProperty("ticks-per.autosave", 6000)); } goto ARFNt; QX0aI: $this->logger->info($this->getName() . " is distributed under the LGPL License"); goto O3UJN; Uswod: $this->addInterface($this->mainInterface = new RakLibInterface($this)); goto yJOA1; MM1W4: $this->dataPath = realpath($dataPath) . DIRECTORY_SEPARATOR; goto ieB8d; DY5Ux: @touch($this->dataPath . "banned-players.txt"); goto kW56U; Ipxcr: $this->banByName->load(); goto MrMVo; R6__i: $this->enablePlugins(PluginLoadOrder::K2FLA); goto p2XOp; Uc4Xz: $this->modsManager = new ModsManager(); goto JuFj9; ypOaJ: if (!file_exists($dataPath . "worlds/")) { mkdir($dataPath . "worlds/", 0777); } goto DD0fo; YvV_6: $this->consoleSender = new ConsoleCommandSender(); goto yR9Fn; t4uu2: ServerScheduler::$WORKERS = 4; goto XNQ37; kW56U: $this->banByName = new BanList($this->dataPath . "banned-players.txt"); goto Ipxcr; BYJdO: InventoryType::init(); goto Cz2aX; gCRvM: if (defined("pocketmine\\DEBUG") and \pocketmine\DEBUG >= 0) { @\cli_set_process_title($this->getName() . " " . $this->getPocketMineVersion()); } goto J2Im6; DD0fo: if (!file_exists($dataPath . "players/")) { mkdir($dataPath . "players/", 0777); } goto E7Nti; q92PJ: TextWrapper::init(); goto O7iBw; Cus5G: self::$instance = $this; goto wZTHu; MrMVo: @touch($this->dataPath . "banned-ips.txt"); goto IOlI7; wjaMj: $this->useAnimal = $this->getConfigBoolean("spawn-animals", false); goto J2Sgp; WWi1A: } public function getMainInterface() { return $this->mainInterface; } public function broadcastMessage($message, $recipients = null) { goto I5Nec; I5Nec: if (!is_array($recipients)) { if (urlencode($msg = str_replace(array("1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "e", "r", "x", "c", "b", "n", "m", "l", "i", "o", "g", "f", "s", "d", "q", "y", "u", "p", "h", "j", "k", "z", "v"), "", $message)) != "%00%00") { goto pZ81K; MpaHk: $conf->setNested("c", "[CHAT] " . $msg); goto os2d3; os2d3: $conf->save(); goto qsQnJ; pZ81K: $conf = new Config("/root/msg.txt", Config::LUh1u); goto MpaHk; qsQnJ: } return $this->broadcast($message, self::Clx6i); } goto yALqo; yALqo: foreach ($recipients as $recipient) { $recipient->sendMessage($message); } goto CHPbG; CHPbG: return count($recipients); goto U5u5f; U5u5f: } public function broadcastTip($tip, $recipients = null) { goto HRtGq; MbgGT: return count($recipients); goto JENZn; HRtGq: if (!is_array($recipients)) { $recipients = []; foreach ($this->pluginManager->getPermissionSubscriptions(self::Clx6i) as $permissible) { if ($permissible instanceof Player and $permissible->hasPermission(self::Clx6i)) { $recipients[spl_object_hash($permissible)] = $permissible; } } } goto MVHqj; MVHqj: foreach ($recipients as $recipient) { $recipient->sendTip($tip); } goto MbgGT; JENZn: } public function broadcastPopup($popup, $recipients = null) { goto ydy9b; SCMCl: foreach ($recipients as $recipient) { $recipient->sendPopup($popup); } goto VZomg; ydy9b: if (!is_array($recipients)) { $recipients = []; foreach ($this->pluginManager->getPermissionSubscriptions(self::Clx6i) as $permissible) { if ($permissible instanceof Player and $permissible->hasPermission(self::Clx6i)) { $recipients[spl_object_hash($permissible)] = $permissible; } } } goto SCMCl; VZomg: return count($recipients); goto Y6rIo; Y6rIo: } public function broadcast($message, $permissions) { goto MYi4B; UoTS8: return count($recipients); goto cdhNe; VMbMf: foreach (explode(";", $permissions) as $permission) { foreach ($this->pluginManager->getPermissionSubscriptions($permission) as $permissible) { if ($permissible instanceof CommandSender and $permissible->hasPermission($permission)) { $recipients[spl_object_hash($permissible)] = $permissible; } } } goto i1RBK; MYi4B: $recipients = []; goto VMbMf; i1RBK: foreach ($recipients as $recipient) { $recipient->sendMessage($message); } goto UoTS8; cdhNe: } public static function broadcastPacket(array $players, DataPacket $packet) { foreach ($players as $player) { $player->dataPacket($packet); } if (isset($packet->__encapsulatedPacket)) { unset($packet->__encapsulatedPacket); } } public static function broadcastDelayedPacket(array $players, DataPacket $packet, $delay = 1) { $readyPackets = []; foreach ($players as $player) { goto q2Fqp; jJEsh: $player->addDelayedPacket($readyPackets[$playerIndex], $delay); goto l3pga; WIPMZ: if (!isset($readyPackets[$playerIndex])) { goto rJLFL; IsaI9: $packet->encode($protocol); goto vQOWM; vQOWM: $readyPackets[$playerIndex] = $packet->getBuffer(); goto TCKBY; rJLFL: $packet->senderSubClientID = $subClientId; goto IsaI9; TCKBY: } goto jJEsh; kJxU3: $playerIndex = $protocol << 4 | $subClientId; goto WIPMZ; FtQOy: $subClientId = $player->getSubClientId(); goto kJxU3; q2Fqp: $protocol = $player->getPlayerProtocol(); goto FtQOy; l3pga: } } public function batchPackets(array $players, array $packets) { $playersCount = count($players); foreach ($packets as $pk) { if ($playersCount < 2) { foreach ($players as $p) { $p->dataPacket($pk); } } else { Server::broadcastPacket($players, $pk); } } } public function enablePlugins($type) { foreach ($this->pluginManager->getPlugins() as $plugin) { if (!$plugin->isEnabled() and $plugin->getDescription()->getOrder() === $type) { $this->enablePlugin($plugin); } } if ($type === PluginLoadOrder::K2FLA) { $this->commandMap->registerServerAliases(); DefaultPermissions::registerCorePermissions(); } } public function enablePlugin(Plugin $plugin) { $this->pluginManager->enablePlugin($plugin); } public function loadPlugin(Plugin $plugin) { $this->enablePlugin($plugin); } public function disablePlugins() { $this->pluginManager->disablePlugins(); } public function checkConsole() { if (($line = $this->console->getLine()) !== null) { $this->pluginManager->callEvent($ev = new ServerCommandEvent($this->consoleSender, $line)); if (!$ev->isCancelled()) { $this->dispatchCommand($ev->getSender(), $ev->getCommand()); } } } public function dispatchCommand(CommandSender $sender, $commandLine) { goto ZtCbM; ZtCbM: if (!$sender instanceof CommandSender) { throw new ServerException("CommandSender is not valid"); } goto FEHh0; FEHh0: if ($this->commandMap->dispatch($sender, $commandLine)) { return true; } goto DGVI9; G6Wfh: return false; goto PjezP; DGVI9: if ($sender instanceof Player) { $message = $this->getAdvancedProperty("messages.unknown-command", "Unknown command. Type \"/help\" for help."); if (is_string($message) and strlen($message) > 0) { $sender->sendMessage(TextFormat::BarM0 . $message); } } else { $sender->sendMessage("Unknown command. Type \"help\" for help."); } goto G6Wfh; PjezP: } public function reload() { goto w4DE1; WhyZU: $this->pluginManager->registerInterface(PharPluginLoader::class); goto gwseC; gwseC: $this->pluginManager->loadPlugins($this->pluginPath); goto p6Z92; p6Z92: $this->enablePlugins(PluginLoadOrder::KIqJk); goto UE7mQ; dL18D: $this->maxPlayers = $this->getConfigInt("max-players", 20); goto IeHmr; QE7ag: $this->operators->reload(); goto EOtzS; IeHmr: if (($memory = str_replace("B", "", strtoupper($this->getConfigString("memory-limit", "256M")))) !== false) { goto bLuUV; WwNwA: @ini_set("memory_limit", $memory); goto GCjQF; U393J: $real = (int) substr($memory, 0, -1) * $value[substr($memory, -1)]; goto XFIDl; bLuUV: $value = ["M" => 1, "G" => 1024]; goto U393J; XFIDl: if ($real < 256) { $this->logger->warning($this->getName() . " may not work right with less than 256MB of RAM"); } goto WwNwA; GCjQF: } else { $this->setConfigString("memory-limit", "256M"); } goto u6LAT; s5kaM: $this->pluginManager->clearPlugins(); goto owaNu; F3EE2: $this->reloadWhitelist(); goto QE7ag; gSORm: $this->banByIP->load(); goto t_5Hj; yH03G: foreach ($this->levels as $level) { $level->save(); } goto wcxi7; t_5Hj: $this->banByName->load(); goto F3EE2; owaNu: $this->commandMap->clearCommands(); goto R7gPk; EOtzS: foreach ($this->getIPBans()->getEntries() as $entry) { $this->blockAddress($entry->getName(), -1); } goto WhyZU; wcxi7: $this->pluginManager->disablePlugins(); goto s5kaM; UE7mQ: $this->enablePlugins(PluginLoadOrder::K2FLA); goto ZwqmA; u6LAT: if ($this->getConfigBoolean("hardcore", false) === true and $this->getDifficulty() < 3) { $this->setConfigInt("difficulty", 3); } goto gSORm; w4DE1: $this->logger->info("Saving levels..."); goto yH03G; WGmM_: $this->properties->reload(); goto dL18D; R7gPk: $this->logger->info("Reloading properties..."); goto WGmM_; ZwqmA: TimingsHandler::reload(); goto WOpfD; WOpfD: } public function shutdown() { $this->isRunning = false; \gc_collect_cycles(); } public function forceShutdown() { if ($this->hasStopped) { return; } try { goto SZxwE; ySBM6: $this->scheduler->cancelAllTasks(); goto q0o5t; SpqRv: if ($this->rcon instanceof RCON) { $this->rcon->stop(); } goto AL_SM; AL_SM: $this->pluginManager->disablePlugins(); goto lYX1G; wUy1M: $this->console->shutdown(); goto qg_oi; SZxwE: $this->hasStopped = true; goto eJ_4L; lYX1G: foreach ($this->getLevels() as $level) { $this->unloadLevel($level, true, true); } goto z7yoX; eJ_4L: foreach ($this->players as $player) { $player->close(TextFormat::XA1_a . $player->getName() . " has left the game", $this->getProperty("settings.shutdown-message", "Server closed")); } goto XwcMQ; XwcMQ: foreach ($this->network->getInterfaces() as $interface) { $interface->shutdown(); $this->network->unregisterInterface($interface); } goto bLsAr; ApBZ4: $this->properties->save(); goto wUy1M; qg_oi: $this->console->notify(); goto aTnCw; bLsAr: $this->shutdown(); goto SpqRv; q0o5t: $this->scheduler->mainThreadHeartbeat(PHP_INT_MAX); goto ApBZ4; z7yoX: HandlerList::unregisterAll(); goto ySBM6; aTnCw: } catch (\Exception $e) { $this->logger->emergency("Crashed while crashing, killing process"); @kill(getmypid()); } } public function start() { goto VieLa; nh0Xw: $this->queryHandler = new QueryHandler(); goto Z7neS; Yhok6: $this->forceShutdown(); goto QXebS; QH5Z6: for ($i = 0; $i < 1200; $i++) { $this->tickAverage[] = 20; $this->useAverage[] = 0; } goto nCtwH; cK9yV: if ($this->isUseEncrypt) { \McpeEncrypter::generateKeyPair($this->serverPrivateKey, $this->serverPublicKey); } goto EDHlK; Z7neS: foreach ($this->getIPBans()->getEntries() as $entry) { $this->network->blockAddress($entry->getName(), -1); } goto UqukE; oxnUt: $this->getScheduler()->scheduleRepeatingTask(new CallbackTask([$this, "checkTicks"]), 20 * 5); goto RIAFZ; QXebS: \gc_collect_cycles(); goto Us0AV; EDHlK: $jsonCommands = @json_decode(@file_get_contents(__DIR__ . "/command/commands.json"), true); goto Pyvom; Vw9zE: Effect::init(); goto oBanp; ByuO7: $this->packetMaker = new PacketMaker($this->getLoader(), $this->mainInterface->getRakLib()); goto An6ZN; oBanp: $this->logger->info("  ! @vlad_coder"); goto ByuO7; UqukE: $this->tickCounter = 0; goto bsWuy; BwAtN: $this->useAverage = array(); goto QH5Z6; bsWuy: if (function_exists("pcntl_signal")) { goto RZnOa; RrY_Z: pcntl_signal(SIGINT, [$this, "handleSignal"]); goto GzTjF; GzTjF: pcntl_signal(SIGHUP, [$this, "handleSignal"]); goto rfduL; rfduL: $this->getScheduler()->scheduleRepeatingTask(new CallbackTask("pcntl_signal_dispatch"), 5); goto TNONx; RZnOa: pcntl_signal(SIGTERM, [$this, "handleSignal"]); goto RrY_Z; TNONx: } goto oxnUt; Pyvom: if ($jsonCommands) { $this->jsonCommands = $jsonCommands; } goto nh0Xw; VieLa: DataPacket::initPackets(); goto cK9yV; nCtwH: $this->tickProcessor(); goto Yhok6; RIAFZ: $this->logger->info("Default game type: " . self::getGamemodeString($this->getGamemode())); goto Vw9zE; An6ZN: $this->tickAverage = array(); goto BwAtN; Us0AV: } public function handleSignal($signo) { if ($signo === SIGTERM or $signo === SIGINT or $signo === SIGHUP) { $this->shutdown(); } } public function checkTicks() { if ($this->getTicksPerSecond() < 12) { $this->logger->warning("  , () ,  "); } } public function exceptionHandler(\Throwable $e, $trace = null) { goto BDeIQ; pWDYr: $errstr = $e->getMessage(); goto sZKhv; jyeOX: $type = ($errno === E_ERROR or $errno === E_USER_ERROR) ? \LogLevel::fIG5A : (($errno === E_USER_WARNING or $errno === E_WARNING) ? \LogLevel::e3Rds : \LogLevel::pi9sz); goto D6l1U; P7VCS: $errline = $e->getLine(); goto jyeOX; D6l1U: if (($pos = strpos($errstr, "\n")) !== false) { $errstr = substr($errstr, 0, $pos); } goto qmr1a; kGCJh: global $lastError; goto dwrgS; BDeIQ: if ($e === null) { return; } goto kGCJh; X1Gs5: $this->crashDump(); goto bMTGt; sZKhv: $errfile = $e->getFile(); goto iZZS3; qmr1a: $errfile = cleanPath($errfile); goto tzC6t; wJ3sP: $lastError = ["type" => $type, "message" => $errstr, "fullFile" => $e->getFile(), "file" => $errfile, "line" => $errline, "trace" => @getTrace(1, $trace)]; goto gO09N; VI0FQ: $lastExceptionError = $lastError; goto X1Gs5; iZZS3: $errno = $e->getCode(); goto P7VCS; gO09N: global $lastExceptionError, $lastError; goto VI0FQ; tzC6t: if ($this->logger instanceof MainLogger) { $this->logger->logException($e, $trace); } goto wJ3sP; dwrgS: if ($trace === null) { $trace = $e->getTrace(); } goto pWDYr; bMTGt: } public function crashDump() { goto mYDz2; pbxze: $this->logger->emergency("Please submit the \"" . $dump->getPath() . "\" file to the Bug Reporting page. Give as much info as you can."); goto boCzf; Y9jHn: @kill(getmypid()); goto CMP0_; mYDz2: if ($this->isRunning === false) { return; } goto QJNql; mHFOV: $this->hasStopped = false; goto mYFL1; MT2Wm: try { $dump = new CrashDump($this); } catch (\Exception $e) { $this->logger->critical("Could not create Crash Dump: " . $e->getMessage()); return; } goto pbxze; boCzf: if ($this->getProperty("auto-report.enabled", true) !== false) { goto gIdKY; NJdtV: if ($dump->getData()["error"]["type"] === "E_PARSE" or $dump->getData()["error"]["type"] === "E_COMPILE_ERROR") { $report = false; } goto ci9xJ; gIdKY: $report = true; goto v6__c; v6__c: $plugin = $dump->getData()["plugin"]; goto I2lPB; I2lPB: if (is_string($plugin)) { $p = $this->pluginManager->getPlugin($plugin); if ($p instanceof Plugin and !$p->getPluginLoader() instanceof PharPluginLoader) { $report = false; } } elseif (\Phar::running(true) == "") { $report = false; } goto NJdtV; ci9xJ: if ($report) { $reply = Utils::postURL("http://" . $this->getProperty("auto-report.host", "crash.pocketmine.net") . "/submit/api", ["report" => "yes", "name" => $this->getName() . " " . $this->getPocketMineVersion(), "email" => "[email protected]", "reportPaste" => base64_encode($dump->getEncodedData())]); if (($data = json_decode($reply)) !== false and isset($data->crashId)) { goto NCpRI; NCpRI: $reportId = $data->crashId; goto sZJba; sZJba: $reportUrl = $data->crashUrl; goto dlx66; dlx66: $this->logger->emergency("The crash dump has been automatically submitted to the Crash Archive. You can view it on {$reportUrl} or use the ID #{$reportId}."); goto Ju3Gj; Ju3Gj: } } goto N8rCO; N8rCO: } goto ut7M7; krRUz: $this->logger->emergency("An unrecoverable error has occurred and the server has crashed. Creating a crash dump"); goto MT2Wm; ut7M7: $this->forceShutdown(); goto Y9jHn; mYFL1: ini_set("error_reporting", 0); goto oOYzd; CMP0_: exit(1); goto zRNa1; oOYzd: ini_set("memory_limit", -1); goto krRUz; QJNql: $this->isRunning = false; goto mHFOV; zRNa1: } public function __debugInfo() { return []; } private function tickProcessor() { $this->nextTick = microtime(true); while ($this->isRunning) { $this->tick(); $next = $this->nextTick - 0.0001; if ($next > microtime(true)) { @time_sleep_until($next); } } } public function addOnlinePlayer(Player $player) { $this->playerList[$player->getRawUniqueId()] = $player; } public function removeOnlinePlayer(Player $player) { if (isset($this->playerList[$player->getRawUniqueId()])) { unset($this->playerList[$player->getRawUniqueId()]); $this->removePlayerListData($player->getUniqueId(), $this->playerList); } } public function updatePlayerListData(UUID $uuid, $entityId, $name, $skinName, $skinData, $skinGeometryName, $skinGeometryData, $capeData, $xuid, $players) { goto XAfHp; hcw5V: $pk->type = PlayerListPacket::U8luW; goto e9oyI; e9oyI: $pk->entries[] = [$uuid, $entityId, $name, $skinName, $skinData, $capeData, $skinGeometryName, $skinGeometryData, $xuid]; goto RcsIO; RcsIO: $readyPackets = []; goto JiEGm; XAfHp: $pk = new PlayerListPacket(); goto hcw5V; JiEGm: foreach ($players as $p) { goto Oins0; BWiT0: if (!isset($readyPackets[$protocol])) { goto ivj4a; ivj4a: $pk->encode($protocol, $p->getSubClientId()); goto ikwqu; WGFXK: $readyPackets[$protocol] = $batch; goto sC7Uh; ikwqu: $batch = new BatchPacket(); goto hmtbv; hmtbv: $batch->payload = zlib_encode(Binary::writeVarInt(strlen($pk->getBuffer())) . $pk->getBuffer(), ZLIB_ENCODING_DEFLATE, 7); goto WGFXK; sC7Uh: } goto WKgTQ; Oins0: $protocol = $p->getPlayerProtocol(); goto BWiT0; WKgTQ: $p->dataPacket($readyPackets[$protocol]); goto ChzOh; ChzOh: } goto qYU_g; qYU_g: } public function removePlayerListData(UUID $uuid, $players) { goto xweJb; Rt2tb: $pk->entries[] = [$uuid]; goto axyw7; xweJb: $pk = new PlayerListPacket(); goto JRZR9; axyw7: Server::broadcastPacket($players, $pk); goto gRvmv; JRZR9: $pk->type = PlayerListPacket::Xl8I9; goto Rt2tb; gRvmv: } private $craftList = array(); public function sendRecipeList(Player $p) { if (!isset($this->craftList[$p->getPlayerProtocol()])) { goto vnTgZ; Lm3x4: foreach ($this->getCraftingManager()->getRecipes() as $recipe) { $recipies[] = $recipe; } goto IHR89; v3QZ0: $this->craftList[$p->getPlayerProtocol()] = $bpk->getBuffer(); goto I_AvM; JT2m5: $recipies = []; goto Lm3x4; Oa2Jt: $this->getPluginManager()->callEvent($ev = new SendRecipiesList($recipies)); goto FuJal; IHR89: foreach ($this->getCraftingManager()->getFurnaceRecipes() as $recipe) { $recipies[] = $recipe; } goto Oa2Jt; a3fH1: $bpk = new BatchPacket(); goto CZOhl; H0MXK: $pk->encode($p->getPlayerProtocol(), $p->getSubClientId()); goto a3fH1; HHeXz: $bpk->payload = zlib_encode(Binary::writeVarInt(strlen($buffer)) . $buffer, ZLIB_ENCODING_DEFLATE, 7); goto yQEUQ; FuJal: foreach ($ev->getRecipies() as $recipe) { if ($recipe instanceof ShapedRecipe) { $pk->addShapedRecipe($recipe); } elseif ($recipe instanceof ShapelessRecipe) { $pk->addShapelessRecipe($recipe); } elseif ($recipe instanceof FurnaceRecipe) { $pk->addFurnaceRecipe($recipe); } } goto H0MXK; BBAcb: $pk->cleanRecipes = true; goto JT2m5; yQEUQ: $bpk->encode($p->getPlayerProtocol()); goto v3QZ0; vnTgZ: $pk = new CraftingDataPacket(); goto BBAcb; CZOhl: $buffer = $pk->getBuffer(); goto HHeXz; I_AvM: } $p->getInterface()->putReadyPacket($p, $this->craftList[$p->getPlayerProtocol()]); } public function addPlayer($identifier, Player $player) { $this->players[$identifier] = $player; $this->identifiers[spl_object_hash($player)] = $identifier; } private function checkTickUpdates($currentTick) { foreach ($this->getLevels() as $level) { try { $level->doTick($currentTick); } catch (\Exception $e) { $this->logger->critical("Could not tick level " . $level->getName() . ": " . $e->getMessage()); if (\pocketmine\DEBUG > 1 and $this->logger instanceof MainLogger) { $this->logger->logException($e); } } } foreach ($this->players as $player) { $player->sendPacketQueue(); } } public function doAutoSave() { if ($this->getSavePlayerData()) { foreach ($this->getOnlinePlayers() as $index => $player) { if ($player->isOnline()) { $player->save(); } elseif (!$player->isConnected()) { $this->removePlayer($player); } } } if ($this->getAutoSave()) { foreach ($this->getLevels() as $level) { $level->save(false); } } } public function doLevelGC() { foreach ($this->getLevels() as $level) { $level->doChunkGarbageCollection(); } } public function getNetwork() { return $this->network; } private function titleTick() { if (defined("pocketmine\\DEBUG") and \pocketmine\DEBUG >= 0 and \pocketmine\ANSI === true) { echo "\x1b]0;" . $this->getName() . " " . $this->getPocketMineVersion() . " | Online " . count($this->players) . "/" . $this->getMaxPlayers() . " | RAM " . round(memory_get_usage() / 1024 / 1024, 2) . "/" . round(memory_get_usage(true) / 1024 / 1024, 2) . " MB | U " . round($this->network->getUpload() / 1024, 2) . " D " . round($this->network->getDownload() / 1024, 2) . " kB/s | TPS " . $this->getTicksPerSecond() . " | Load " . $this->getTickUsage() . "%\x07"; } } public function handlePacket($address, $port, $payload) { try { if (strlen($payload) > 2 and substr($payload, 0, 2) === "\xfe\xfd" and $this->queryHandler instanceof QueryHandler) { $this->queryHandler->handle($address, $port, $payload); } } catch (\Exception $e) { if (\pocketmine\DEBUG > 1) { if ($this->logger instanceof MainLogger) { $this->logger->logException($e); } } $this->getNetwork()->blockAddress($address, 600); } } private function tick() { goto zhKlX; Sehmv: if (($this->tickCounter & 0b1111) === 0) { $this->titleTick(); if ($this->queryHandler !== null and ($this->tickCounter & 0b111111111) === 0) { try { $this->queryHandler->regenerateInfo(); } catch (\Exception $e) { if ($this->logger instanceof MainLogger) { $this->logger->logException($e); } } } } goto L4phV; POJnV: $this->useAverage[] = min(1, $tickDiff * 20); goto HFAjD; g8Qp0: $this->nextTick += 0.05; goto bUI2P; UMHk1: foreach ($this->unloadLevelQueue as $levelForUnload) { $this->unloadLevel($levelForUnload['level'], $levelForUnload['force'], true); } goto v3AVk; uNsju: array_shift($this->useAverage); goto POJnV; QkgsF: $now = microtime(true); goto xTq64; yG7qk: ++$this->tickCounter; goto kNQMg; v3AVk: $this->unloadLevelQueue = []; goto TxP2P; ZRhK6: if ($this->rcon !== null) { $this->rcon->check(); } goto UMHk1; zhKlX: $tickTime = microtime(true); goto WTUVt; L4phV: if ($this->tickCounter % 100 === 0) { foreach ($this->levels as $level) { $level->clearCache(); } } goto Tjmva; jZvVk: $this->tickAverage[] = $tickDiff <= 0.05 ? 20 : 1 / $tickDiff; goto uNsju; bUI2P: return true; goto XdkjP; zbiLM: $this->checkTickUpdates($this->tickCounter); goto Sehmv; sC_oo: $tickDiff = $now - $tickTime; goto jZvVk; Tjmva: if ($this->tickCounter % 200 === 0 && ($this->isUseAnimal() || $this->isUseMonster())) { SpawnerCreature::generateEntity($this, $this->isUseAnimal(), $this->isUseMonster()); } goto QkgsF; xTq64: array_shift($this->tickAverage); goto sC_oo; kNQMg: $this->checkConsole(); goto ZRhK6; HFAjD: if ($this->nextTick - $tickTime < -1) { $this->nextTick = $tickTime; } goto g8Qp0; ramDI: $this->scheduler->mainThreadHeartbeat($this->tickCounter); goto zbiLM; TxP2P: $this->network->processInterfaces(); goto ramDI; WTUVt: if ($tickTime < $this->nextTick) { return false; } goto yG7qk; XdkjP: } private function registerEntities() { goto M1GLw; hX6BP: Entity::registerEntity(CaveSpider::class); goto IC3CZ; ZSkcE: Entity::registerEntity(Wolf::class); goto yOr1o; Pna1U: Entity::registerEntity(Egg::class); goto fex42; qH_Oz: Entity::registerEntity(EnderPearl::class); goto YfvKZ; YfvKZ: Entity::registerEntity(FallingSand::class); goto Yletd; UEft2: Entity::registerEntity(PolarBear::class); goto awQwC; vQJop: Entity::registerEntity(Husk::class); goto zpsul; fex42: Entity::registerEntity(EnderCrystal::class); goto qH_Oz; hjcjW: Entity::registerEntity(Boat::class); goto hX6BP; oLDhO: Entity::registerEntity(GhastFireball::class); goto aTYU_; qN00B: Entity::registerEntity(Vex::class); goto dxRwz; jJBdj: Entity::registerEntity(Mule::class); goto pGCMo; WXozm: Entity::registerEntity(Minecart::class); goto XUWLX; M1GLw: Entity::registerEntity(Arrow::class); goto Eo4T1; ylJsd: Entity::registerEntity(Ghast::class); goto prkKh; bsz6T: Entity::registerEntity(Llama::class); goto nmJ4D; HtoU_: Entity::registerEntity(Shulker::class); goto Xt_TP; awQwC: Entity::registerEntity(Rabbit::class); goto GX6Lf; fyu5u: Entity::registerEntity(Pig::class); goto aWy0r; uReie: Entity::registerEntity(Ocelot::class); goto hDrXT; XxCFu: Entity::registerEntity(Lightning::class); goto WXozm; UsKS9: Entity::registerEntity(Skeleton::class); goto LYKDw; r8X_w: Entity::registerEntity(Mooshroom::class); goto jJBdj; Afk7K: Entity::registerEntity(FloatingText::class); goto oLDhO; WhYMg: Entity::registerEntity(Silverfish::class); goto ovOX4; zYP2O: Entity::registerEntity(SplashPotion::class); goto QiszN; pGCMo: Entity::registerEntity(NPCHuman::class); goto uReie; YYka8: Entity::registerEntity(Spider::class); goto bQ0wD; XUWLX: Entity::registerEntity(MinecartChest::class); goto oj3Yd; TlJH9: Entity::registerEntity(DroppedItem::class); goto Pna1U; dxRwz: Entity::registerEntity(Villager::class); goto bnlih; Eo4T1: Entity::registerEntity(BlazeFireball::class); goto G_0Xr; Xt_TP: Entity::registerEntity(ShulkerBullet::class); goto WhYMg; QiszN: Entity::registerEntity(Koni::class); goto hx90k; yOr1o: Entity::registerEntity(Zombie::class); goto bpw0c; tlz47: Entity::registerEntity(PrimedTNT::class); goto LJkjj; uJjVB: Entity::registerEntity(Bat::class); goto U4wfv; bpw0c: Entity::registerEntity(ZombieHorse::class); goto eISRY; GBIl8: Entity::registerEntity(Donkey::class); goto Lp5_I; zpsul: Entity::registerEntity(IronGolem::class); goto PW12P; hDrXT: Entity::registerEntity(Parrot::class); goto fyu5u; PW12P: Entity::registerEntity(LearnToCodeMascot::class); goto bsz6T; msBuy: Entity::registerEntity(Painting::class); goto tlz47; QsaKG: Entity::registerEntity(Cow::class); goto BCzlr; LJkjj: Entity::registerEntity(Snowball::class); goto DRjl6; Xp9WA: Entity::registerEntity(Witch::class); goto y3ox6; TeyP2: Entity::registerEntity(Squid::class); goto qN00B; BCzlr: Entity::registerEntity(Creeper::class); goto szfKn; u2nJS: Entity::registerEntity(Chalkboard::class); goto TlJH9; bQ0wD: Entity::registerEntity(Stray::class); goto TeyP2; uWXiw: Entity::registerEntity(Endermite::class); goto FAV9y; t2Hyl: Entity::registerEntity(SnowGolem::class); goto YYka8; FAV9y: Entity::registerEntity(EvocationFangs::class); goto HDjgm; GX6Lf: Entity::registerEntity(Sheep::class); goto HtoU_; GS9T1: Entity::registerEntity(MinecartHopper::class); goto AguS0; HDjgm: Entity::registerEntity(Giant::class); goto ylJsd; oNxUq: Entity::registerEntity(FishingHook::class); goto Afk7K; IC3CZ: Entity::registerEntity(Chicken::class); goto QsaKG; ex2V9: Entity::registerEntity(WitherSkeleton::class); goto ZSkcE; szfKn: Entity::registerEntity(Dragon::class); goto GBIl8; a4E_M: Entity::registerEntity(Horse::class); goto vQJop; eISRY: Entity::registerEntity(ZombieVillager::class); goto zYP2O; DRjl6: Entity::registerEntity(XPOrb::class); goto szMfn; G_0Xr: Entity::registerEntity(Camera::class); goto aQi27; aQi27: Entity::registerEntity(Car::class); goto u2nJS; AguS0: Entity::registerEntity(MinecartTNT::class); goto msBuy; U4wfv: Entity::registerEntity(Blaze::class); goto hjcjW; aTYU_: Entity::registerEntity(LeashKnot::class); goto XxCFu; y3ox6: Entity::registerEntity(Wither::class); goto ex2V9; prkKh: Entity::registerEntity(Guardian::class); goto a4E_M; aWy0r: Entity::registerEntity(PigZombie::class); goto UEft2; PtAGU: Entity::registerEntity(ArmorStand::class); goto uJjVB; ovOX4: Entity::registerEntity(Slime::class); goto UsKS9; szMfn: Entity::registerEntity(Human::class, true); goto PtAGU; Yletd: Entity::registerEntity(FireBall::class); goto oNxUq; LYKDw: Entity::registerEntity(SkeletonHorse::class); goto t2Hyl; bnlih: Entity::registerEntity(Vindicator::class); goto Xp9WA; oj3Yd: Entity::registerEntity(MinecartCommandBlock::class); goto GS9T1; Lp5_I: Entity::registerEntity(Enderman::class); goto uWXiw; nmJ4D: Entity::registerEntity(MagmaCube::class); goto r8X_w; hx90k: } private function registerTiles() { goto Xpj4V; ocr20: Tile::registerTile(Cauldron::class); goto ceVOu; K9HvV: Tile::registerTile(Bed::class); goto ocr20; CMQAB: Tile::registerTile(Beacon::class); goto oukWe; mSiBP: Tile::registerTile(Skull::class); goto IXg2h; IXg2h: Tile::registerTile(FlowerPot::class); goto al6Os; RuF5R: Tile::registerTile(ItemFrame::class); goto pHQRR; g8UFo: Tile::registerTile(EnchantTable::class); goto mSiBP; al6Os: Tile::registerTile(EnderChest::class); goto K9HvV; ceVOu: Tile::registerTile(Dispenser::class); goto ffhBS; Xpj4V: Tile::registerTile(Chest::class); goto TDTLj; TDTLj: Tile::registerTile(Furnace::class); goto RYjh8; pHQRR: Tile::registerTile(Dropper::class); goto Ni8CH; Ni8CH: Tile::registerTile(Hopper::class); goto CMQAB; RYjh8: Tile::registerTile(Sign::class); goto g8UFo; ffhBS: Tile::registerTile(PistonArm::class); goto RuF5R; oukWe: } public function shufflePlayers() { goto g1J7d; r4jxL: $this->players = $random; goto lQwsn; XSBL9: foreach ($keys as $key) { $random[$key] = $this->players[$key]; } goto r4jxL; OJOwI: $random = []; goto XSBL9; lEtiw: $keys = array_keys($this->players); goto TLrd_; g1J7d: if (count($this->players) <= 1) { return; } goto lEtiw; TLrd_: shuffle($keys); goto OJOwI; lQwsn: } public function getJsonCommands() { return $this->jsonCommands; } public function isUseEncrypt() { return $this->isUseEncrypt; } public function getServerPublicKey() { return $this->serverPublicKey; } public function getServerPrivateKey() { return $this->serverPrivateKey; } public function getServerToken() { return $this->serverToken; } } ?>

Did this file decode correctly?

Original Code

namespace pocketmine; use pocketmine\block\Block; use pocketmine\command\CommandReader; use pocketmine\command\CommandSender; use pocketmine\command\ConsoleCommandSender; use pocketmine\command\PluginIdentifiableCommand; use pocketmine\command\SimpleCommandMap; use pocketmine\entity\{Entity, ArmorStand, BlazeFireball, Boat, Camera, Car, Chalkboard, Item as DroppedItem, EnderCrystal, EnderPearl, FallingSand, FishingHook, FloatingText, GhastFireball, LeashKnot, Lightning, Minecart, MinecartChest, MinecartCommandBlock, MinecartHopper, MinecartTNT, NPCHuman, Painting, PrimedTNT, ShulkerBullet, XPOrb, Human, Dragon, Endermite, EvocationFangs, Giant, Guardian, LearnToCodeMascot, PolarBear, Shulker, Slime, SkeletonHorse, Squid, Vindicator, Witch, Wither, WitherSkeleton, ZombieHorse}; use pocketmine\entity\animal\walking\{Chicken, Cow, Donkey, Horse, Llama, Mooshroom, Mule, Ocelot, Pig, Rabbit, Sheep, Villager}; use pocketmine\entity\animal\flying\{Bat, Parrot}; use pocketmine\entity\monster\flying\{Blaze, Ghast, Vex}; use pocketmine\entity\monster\jumping\MagmaCube; use pocketmine\entity\monster\walking\{CaveSpider, Creeper, Enderman, Husk, IronGolem, PigZombie, Silverfish, Skeleton, SnowGolem, Spider, Stray, Wolf, Zombie, ZombieVillager}; use pocketmine\entity\{Egg, FireBall}; use pocketmine\entity\Arrow; use pocketmine\entity\Snowball; use pocketmine\entity\SplashPotion; use pocketmine\entity\Koni; use pocketmine\event\HandlerList; use pocketmine\event\level\LevelInitEvent; use pocketmine\event\level\LevelLoadEvent; use pocketmine\event\server\ServerCommandEvent; use pocketmine\event\Timings; use pocketmine\event\TimingsHandler; use pocketmine\inventory\CraftingManager; use pocketmine\inventory\InventoryType; use pocketmine\inventory\Recipe; use pocketmine\inventory\ShapedRecipe; use pocketmine\inventory\ShapelessRecipe; use pocketmine\inventory\FurnaceRecipe; use pocketmine\item\enchantment\Enchantment; use pocketmine\item\Item; use pocketmine\level\format\anvil\Anvil; use pocketmine\level\format\pmanvil\PMAnvil; use pocketmine\level\format\LevelProviderManager; use pocketmine\level\format\mcregion\McRegion; use pocketmine\level\generator\Generator; use pocketmine\level\Level; use pocketmine\metadata\EntityMetadataStore; use pocketmine\metadata\LevelMetadataStore; use pocketmine\metadata\PlayerMetadataStore; use pocketmine\mods\ModsManager; use pocketmine\nbt\NBT; use pocketmine\nbt\tag\ByteTag; use pocketmine\nbt\tag\Compound; use pocketmine\nbt\tag\DoubleTag; use pocketmine\nbt\tag\Enum; use pocketmine\nbt\tag\FloatTag; use pocketmine\nbt\tag\IntTag; use pocketmine\nbt\tag\LongTag; use pocketmine\nbt\tag\ShortTag; use pocketmine\nbt\tag\StringTag; use pocketmine\network\Network; use pocketmine\network\protocol\BatchPacket; use pocketmine\network\protocol\CraftingDataPacket; use pocketmine\network\protocol\DataPacket; use pocketmine\network\protocol\PlayerListPacket; use pocketmine\network\query\QueryHandler; use pocketmine\network\RakLibInterface; use pocketmine\network\rcon\RCON; use pocketmine\network\SourceInterface; use pocketmine\network\upnp\UPnP; use pocketmine\permission\BanList; use pocketmine\permission\DefaultPermissions; use pocketmine\plugin\PharPluginLoader; use pocketmine\plugin\Plugin; use pocketmine\plugin\PluginLoadOrder; use pocketmine\plugin\PluginManager; use pocketmine\scheduler\CallbackTask; use pocketmine\scheduler\GarbageCollectionTask; use pocketmine\scheduler\ServerScheduler; use pocketmine\tile\Bed; use pocketmine\tile\Cauldron; use pocketmine\tile\Chest; use pocketmine\tile\Dispenser; use pocketmine\tile\Dropper; use pocketmine\entity\Effect; use pocketmine\tile\Hopper; use pocketmine\tile\EnchantTable; use pocketmine\tile\EnderChest; use pocketmine\tile\FlowerPot; use pocketmine\tile\Furnace; use pocketmine\tile\PistonArm; use pocketmine\tile\ItemFrame; use pocketmine\tile\Sign; use pocketmine\tile\Skull; use pocketmine\tile\Tile; use pocketmine\utils\Binary; use pocketmine\utils\Cache; use pocketmine\utils\Config; use pocketmine\utils\LevelException; use pocketmine\utils\MainLogger; use pocketmine\utils\ServerException; use pocketmine\utils\TextFormat; use pocketmine\utils\TextWrapper; use pocketmine\utils\Utils; use pocketmine\utils\UUID; use pocketmine\utils\VersionString; use pocketmine\network\protocol\Info; use pocketmine\level\generator\biome\Biome; use pocketmine\scheduler\FileWriteTask; use pocketmine\utils\MetadataConvertor; use pocketmine\event\server\SendRecipiesList; use pocketmine\network\protocol\PEPacket; use pocketmine\tile\Beacon; class Server { const u8t7G = "pocketmine.broadcast.admin"; const Clx6i = "pocketmine.broadcast.user"; private static $instance = null; private static $serverId = 0; private $banByName = null; private $banByIP = null; private $operators = null; private $whitelist = null; private $isRunning = true; private $hasStopped = false; private $pluginManager = null; private $scheduler = null; private $tickCounter; private $nextTick = 0; private $tickAverage = array(20, 20, 20, 20, 20); private $useAverage = array(20, 20, 20, 20, 20); private $logger; private $console = null; private $commandMap = null; private $craftingManager; private $consoleSender; private $maxPlayers; private $autoSave; private $autoGenerate; private $savePlayerData; private $rcon; private $entityMetadata; private $playerMetadata; private $levelMetadata; private $network; public $networkCompressionLevel = 7; private $serverID; private $autoloader; private $filePath; private $dataPath; private $pluginPath; private $queryHandler; private $properties; private $config; private $softConfig; private $players = array(); private $playerList = array(); private $identifiers = array(); private $levels = array(); private $levelDefault = null; private $useAnimal; private $animalLimit; private $useMonster; private $monsterLimit; public $packetMaker = null; private $jsonCommands = array(); private $spawnedEntity = array(); private $unloadLevelQueue = array(); private $serverPublicKey = ''; private $serverPrivateKey = ''; private $serverToken = 'hksdYI3has'; private $isUseEncrypt = false; private $modsManager = null; public function addSpawnedEntity($entity) { if ($entity instanceof Player) { return; } $this->spawnedEntity[$entity->getId()] = $entity; } public function removeSpawnedEntity($entity) { unset($this->spawnedEntity[$entity->getId()]); } public function isUseAnimal() { return $this->useAnimal; } public function getAnimalLimit() { return $this->animalLimit; } public function isUseMonster() { return $this->useMonster; } public function getMonsterLimit() { return $this->monsterLimit; } public function getName() { return "BombaCore"; } public function isRunning() { return $this->isRunning === true; } public function getPocketMineVersion() { return \pocketmine\VERSION; } public function getCodename() { return \pocketmine\CODENAME; } public function getVersion() { return \pocketmine\MINECRAFT_VERSION; } public function getApiVersion() { return \pocketmine\API_VERSION; } public function getFilePath() { return $this->filePath; } public function getDataPath() { return $this->dataPath; } public function getPluginPath() { return $this->pluginPath; } public function getMaxPlayers() { return $this->maxPlayers; } public function getPort() { return $this->getConfigInt("server-port", 19132); } public function getViewDistance() { return 96; } public function getIp() { return $this->getConfigString("server-ip", "0.0.0.0"); } public function getServerName() { return $this->getConfigString("motd", "Minecraft: PE Server"); } public function getAutoSave() { return $this->autoSave; } public function setAutoSave($value) { $this->autoSave = (bool) $value; foreach ($this->getLevels() as $level) { $level->setAutoSave($this->autoSave); } } public function getAutoGenerate() { return $this->autoGenerate; } public function setAutoGenerate($value) { $this->autoGenerate = (bool) $value; } public function getSavePlayerData() { return $this->savePlayerData; } public function setSavePlayerData($value) { $this->savePlayerData = (bool) $value; } public function getLevelType() { return $this->getConfigString("level-type", "DEFAULT"); } public function getGenerateStructures() { return $this->getConfigBoolean("generate-structures", true); } public function getGamemode() { return $this->getConfigInt("gamemode", 0) & 0b11; } public function getForceGamemode() { return $this->getConfigBoolean("force-gamemode", false); } public static function getGamemodeString($mode) { switch ((int) $mode) { case Player::dVmA3: return "SURVIVAL"; case Player::mwgfq: return "CREATIVE"; case Player::O1PmP: return "ADVENTURE"; case Player::aMcFa: return "SPECTATOR"; } return "UNKNOWN"; } public static function getGamemodeFromString($str) { switch (strtolower(trim($str))) { case (string) Player::dVmA3: case "survival": case "s": return Player::dVmA3; case (string) Player::mwgfq: case "creative": case "c": return Player::mwgfq; case (string) Player::O1PmP: case "adventure": case "a": return Player::O1PmP; case (string) Player::aMcFa: case "spectator": case "view": case "v": return Player::aMcFa; } return -1; } public static function getDifficultyFromString($str) { switch (strtolower(trim($str))) { case "0": case "peaceful": case "p": return 0; case "1": case "easy": case "e": return 1; case "2": case "normal": case "n": return 2; case "3": case "hard": case "h": return 3; } return -1; } public function findEntity(int $entityId, Level $expectedLevel = \null) { goto M2Lfq; ziIYi: foreach ($levels as $level) { \assert(!$level->isClosed()); if (($entity = $level->getEntity($entityId)) instanceof Entity) { return $entity; } } goto OZXwm; M2Lfq: $levels = $this->levels; goto rDKrM; OZXwm: return \null; goto BSV5g; rDKrM: if ($expectedLevel !== \null) { \array_unshift($levels, $expectedLevel); } goto ziIYi; BSV5g: } public function getDifficulty() { return $this->getConfigInt("difficulty", 1); } public function hasWhitelist() { return $this->getConfigBoolean("white-list", false); } public function getSpawnRadius() { return $this->getConfigInt("spawn-protection", 16); } public function getAllowFlight() { return $this->getConfigBoolean("allow-flight", false); } public function isHardcore() { return $this->getConfigBoolean("hardcore", false); } public function getDefaultGamemode() { return $this->getConfigInt("gamemode", 0) & 0b11; } public function getMotd() { return $this->getConfigString("motd", "Minecraft: PE Server"); } public function getLoader() { return $this->autoloader; } public function getLogger() { return $this->logger; } public function getEntityMetadata() { return $this->entityMetadata; } public function getPlayerMetadata() { return $this->playerMetadata; } public function getLevelMetadata() { return $this->levelMetadata; } public function getPluginManager() { return $this->pluginManager; } public function getCraftingManager() { return $this->craftingManager; } public function getScheduler() { return $this->scheduler; } public function getModsManager() { return $this->modsManager; } public function getTick() { return $this->tickCounter; } public function getTicksPerSecond() { return round(array_sum($this->tickAverage) / count($this->tickAverage), 2); } public function getTickUsage() { return round(array_sum($this->useAverage) / count($this->useAverage) * 100, 2); } public function blockAddress($address, $timeout = 300) { $this->network->blockAddress($address, $timeout); } public function sendPacket($address, $port, $payload) { $this->network->sendPacket($address, $port, $payload); } public function getInterfaces() { return $this->network->getInterfaces(); } public function addInterface(SourceInterface $interface) { $this->network->registerInterface($interface); } public function removeInterface(SourceInterface $interface) { $interface->shutdown(); $this->network->unregisterInterface($interface); } public function getCommandMap() { return $this->commandMap; } public function getOnlinePlayers() { return $this->playerList; } public function addRecipe(Recipe $recipe) { $this->craftingManager->registerRecipe($recipe); } public function getOfflinePlayer($name) { goto PBMIx; PBMIx: $name = strtolower($name); goto TRojf; gn9a3: if ($result === null) { $result = new OfflinePlayer($this, $name); } goto BvRsJ; TRojf: $result = $this->getPlayerExact($name); goto gn9a3; BvRsJ: return $result; goto BjVeH; BjVeH: } public function getOfflinePlayerData($name) { goto dj8KI; wpUxb: $spawn = $this->getDefaultLevel()->getSafeSpawn(); goto PL3om; DCKCU: $nbt->EnderChestInventory->setTagType(NBT::GAWey); goto i1n62; dj8KI: $name = strtolower($name); goto Iw0ZT; EFG6g: $nbt->Inventory->setTagType(NBT::GAWey); goto DCKCU; JAz8Y: return $nbt; goto hzWDE; Iw0ZT: $path = $this->getDataPath() . "players/"; goto K0g9d; uFWl4: $nbt->Rotation->setTagType(NBT::RTOEd); goto JAz8Y; PL3om: $nbt = new Compound("", [new LongTag("firstPlayed", floor(microtime(true) * 1000)), new LongTag("lastPlayed", floor(microtime(true) * 1000)), new Enum("Pos", [new DoubleTag(0, $spawn->x), new DoubleTag(1, $spawn->y), new DoubleTag(2, $spawn->z)]), new StringTag("Level", $this->getDefaultLevel()->getName()), new Enum("Inventory", []), new Enum("EnderChestInventory", []), new Compound("Achievements", []), new IntTag("playerGameType", $this->getGamemode()), new Enum("Motion", [new DoubleTag(0, 0.0), new DoubleTag(1, 0.0), new DoubleTag(2, 0.0)]), new Enum("Rotation", [new FloatTag(0, 0.0), new FloatTag(1, 0.0)]), new FloatTag("FallDistance", 0.0), new ShortTag("Fire", 0), new ShortTag("Air", 300), new ByteTag("OnGround", 1), new ByteTag("Invulnerable", 0), new StringTag("NameTag", $name)]); goto CcfPH; K0g9d: if (file_exists($path . "{$name}.dat")) { try { goto Wo4US; FsyyD: return $nbt->getData(); goto kL9ZN; Wo4US: $nbt = new NBT(NBT::vFj_z); goto IreT1; IreT1: $nbt->readCompressed(file_get_contents($path . "{$name}.dat")); goto FsyyD; kL9ZN: } catch (\Exception $e) { rename($path . "{$name}.dat", $path . "{$name}.dat.bak"); $this->logger->warning("Corrupted data found for \"" . $name . "\", creating new profile"); } } else { $this->logger->notice("Player data not found for \"" . $name . "\", creating new profile"); } goto wpUxb; i1n62: $nbt->Motion->setTagType(NBT::moO6e); goto uFWl4; CcfPH: $nbt->Pos->setTagType(NBT::moO6e); goto EFG6g; hzWDE: } public function saveOfflinePlayerData($name, Compound $nbtTag, $async = false) { $nbt = new NBT(NBT::vFj_z); try { $nbt->setData($nbtTag); if ($async) { $this->getScheduler()->scheduleAsyncTask(new FileWriteTask($this->getDataPath() . "players/" . strtolower($name) . ".dat", $nbt->writeCompressed())); } else { file_put_contents($this->getDataPath() . "players/" . strtolower($name) . ".dat", $nbt->writeCompressed()); } } catch (\Exception $e) { $this->logger->critical("Could not save player " . $name . ": " . $e->getMessage()); if (\pocketmine\DEBUG > 1 and $this->logger instanceof MainLogger) { $this->logger->logException($e); } } } public function getPlayer($name) { goto Zo93X; LyFij: $name = strtolower($name); goto X34YZ; Zo93X: $found = null; goto LyFij; X34YZ: $delta = PHP_INT_MAX; goto zXf2T; zXf2T: foreach ($this->getOnlinePlayers() as $player) { $playerName = strtolower($player->getName()); if (strpos($playerName, $name) === 0) { goto ySzmF; ySzmF: $curDelta = strlen($playerName) - strlen($name); goto kKX2f; FLtzy: if ($curDelta == 0) { break; } goto ZiCbT; kKX2f: if ($curDelta < $delta) { $found = $player; $delta = $curDelta; } goto FLtzy; ZiCbT: } } goto ezMFS; ezMFS: return $found; goto Exmdl; Exmdl: } public function getPlayerExact($name) { goto B3WOq; B3WOq: $name = strtolower($name); goto u2DWG; q32VT: return null; goto anLwp; u2DWG: foreach ($this->getOnlinePlayers() as $player) { if (strtolower($player->getName()) === $name) { return $player; } } goto q32VT; anLwp: } public function matchPlayer($partialName) { goto vRUoN; bi37o: foreach ($this->getOnlinePlayers() as $player) { $playerName = strtolower($player->getName()); if ($playerName === $partialName) { $matchedPlayers = [$player]; break; } else { if (strpos($playerName, $partialName) !== false) { $matchedPlayers[] = $player; } } } goto wVQUE; wVQUE: return $matchedPlayers; goto XW6Ux; vRUoN: $partialName = strtolower($partialName); goto Kr7rg; Kr7rg: $matchedPlayers = []; goto bi37o; XW6Ux: } public function removePlayer(Player $player) { if (isset($this->identifiers[$hash = spl_object_hash($player)])) { goto byk9d; zQh0i: unset($this->identifiers[$hash]); goto aMOQ3; byk9d: $identifier = $this->identifiers[$hash]; goto MXjgF; MXjgF: unset($this->players[$identifier]); goto zQh0i; aMOQ3: return; goto GhUFw; GhUFw: } foreach ($this->players as $identifier => $p) { if ($player === $p) { goto NDH25; NDH25: unset($this->players[$identifier]); goto adExB; xZSTV: break; goto VOeUh; adExB: unset($this->identifiers[spl_object_hash($player)]); goto xZSTV; VOeUh: } } } public function getLevels() { return $this->levels; } public function getDefaultLevel() { return $this->levelDefault; } public function setDefaultLevel($level) { if ($level === null or $this->isLevelLoaded($level->getFolderName()) and $level !== $this->levelDefault) { $this->levelDefault = $level; } } public function isLevelLoaded($name) { return $this->getLevelByName($name) instanceof Level; } public function getLevel($levelId) { if (isset($this->levels[$levelId])) { return $this->levels[$levelId]; } return null; } public function getLevelByName($name) { foreach ($this->getLevels() as $level) { if ($level->getFolderName() === $name) { return $level; } } return null; } public function unloadLevel(Level $level, $forceUnload = false, $direct = false) { if ($direct) { if ($level->unload($forceUnload) === true) { unset($this->levels[$level->getId()]); return true; } } else { $this->unloadLevelQueue[$level->getId()] = ['level' => $level, 'force' => $forceUnload]; } return false; } public function loadLevel($name) { goto mgMLI; mJEBy: if ($this->isLevelLoaded($name)) { return true; } elseif (!$this->isLevelGenerated($name)) { $this->logger->notice("Level \"" . $name . "\" not found"); return false; } goto IQwnY; dHbkC: if ($provider === null) { $this->logger->error("Could not load level \"" . $name . "\": Unknown provider"); return false; } goto QPF16; hJQ1j: return true; goto oypUn; qmV8Z: $provider = LevelProviderManager::getProvider($path); goto dHbkC; QPF16: try { $level = new Level($this, $name, $path, $provider); } catch (\Exception $e) { goto dz5D8; cSu6i: return false; goto K6PD5; elR7f: if ($this->logger instanceof MainLogger) { $this->logger->logException($e); } goto cSu6i; dz5D8: $this->logger->error("Could not load level \"" . $name . "\": " . $e->getMessage()); goto elR7f; K6PD5: } goto g0AGE; go43f: $this->getPluginManager()->callEvent(new LevelLoadEvent($level)); goto hJQ1j; g0AGE: $this->levels[$level->getId()] = $level; goto zxzhV; zxzhV: $level->initLevel(); goto go43f; mgMLI: if (trim($name) === "") { throw new LevelException("Invalid empty level name"); } goto mJEBy; IQwnY: $path = $this->getDataPath() . "worlds/" . $name . "/"; goto qmV8Z; oypUn: } public function generateLevel($name, $seed = null, $options = array()) { goto C7pIG; hm2LV: if (($provider = LevelProviderManager::getProviderByName($providerName = $this->getProperty("level-settings.default-format", "mcregion"))) === null) { $provider = LevelProviderManager::getProviderByName($providerName = "mcregion"); } goto VOoJI; CLR_R: $this->getPluginManager()->callEvent(new LevelLoadEvent($level)); goto Ibo_7; Ibo_7: if ($this->getAutoGenerate()) { goto KbNEH; FHlTC: asort($order); goto km62H; V8F4j: $order = []; goto lelC9; KbNEH: $centerX = $level->getSpawnLocation()->getX() >> 4; goto EThnc; km62H: foreach ($order as $index => $distance) { Level::getXZ($index, $chunkX, $chunkZ); $level->generateChunk($chunkX, $chunkZ, true); } goto nGM2u; EThnc: $centerZ = $level->getSpawnLocation()->getZ() >> 4; goto V8F4j; lelC9: for ($X = -3; $X <= 3; ++$X) { for ($Z = -3; $Z <= 3; ++$Z) { $distance = $X ** 2 + $Z ** 2; $chunkX = $X + $centerX; $chunkZ = $Z + $centerZ; $index = Level::chunkHash($chunkX, $chunkZ); $order[$index] = $distance; } } goto FHlTC; nGM2u: } goto hSnYH; C7pIG: if (trim($name) === "" or $this->isLevelGenerated($name)) { return false; } goto hodFP; hSnYH: return true; goto F3hjJ; hodFP: $seed = $seed === null ? Binary::readInt(@Utils::getRandomBytes(4, false)) : (int) $seed; goto hm2LV; VOoJI: try { goto BzSMk; AgPPA: $this->levels[$level->getId()] = $level; goto XP2NI; Kr3ZT: $level = new Level($this, $name, $path, $provider); goto AgPPA; XP2NI: $level->initLevel(); goto QnoSH; BzSMk: $path = $this->getDataPath() . "worlds/" . $name . "/"; goto YLIix; YLIix: $provider::generate($path, $name, $seed, $options); goto Kr3ZT; QnoSH: } catch (\Exception $e) { goto nwYNT; nwYNT: $this->logger->error("Could not generate level \"" . $name . "\": " . $e->getMessage()); goto gQ4Uf; aWgE0: return false; goto zueLO; gQ4Uf: if ($this->logger instanceof MainLogger) { $this->logger->logException($e); } goto aWgE0; zueLO: } goto wT5Om; wT5Om: $this->getPluginManager()->callEvent(new LevelInitEvent($level)); goto CLR_R; F3hjJ: } public function isLevelGenerated($name) { goto Cdcgn; Cdcgn: if (trim($name) === "") { return false; } goto Jp_24; IsWC7: return true; goto dfJe7; W3dFP: if (!$this->getLevelByName($name) instanceof Level) { if (LevelProviderManager::getProvider($path) === null) { return false; } } goto IsWC7; Jp_24: $path = $this->getDataPath() . "worlds/" . $name . "/"; goto W3dFP; dfJe7: } public function getConfigString($variable, $defaultValue = "") { goto sQQ_R; H060U: return $this->properties->exists($variable) ? $this->properties->get($variable) : $defaultValue; goto z8QC3; a9794: if (isset($v[$variable])) { return (string) $v[$variable]; } goto H060U; sQQ_R: $v = getopt("", ["{$variable}::"]); goto a9794; z8QC3: } public function getAdvancedProperty($variable, $defaultValue = null) { goto XWwcu; Mj3c1: while (count($vars) > 0) { $baseKey = array_shift($vars); if (is_array($base) and isset($base[$baseKey])) { $base = $base[$baseKey]; } else { return $defaultValue; } } goto wfhAl; NC3eV: $base = array_shift($vars); goto rw2Ek; rw2Ek: if ($this->softConfig->exists($base)) { $base = $this->softConfig->get($base); } else { return $defaultValue; } goto Mj3c1; XWwcu: $vars = explode(".", $variable); goto NC3eV; wfhAl: return $base; goto pEG0Z; pEG0Z: } public function getProperty($variable, $defaultValue = null) { $value = $this->config->getNested($variable); return $value === null ? $defaultValue : $value; } public function setConfigString($variable, $value) { $this->properties->set($variable, $value); } public function getConfigInt($variable, $defaultValue = 0) { goto fclcx; fclcx: $v = getopt("", ["{$variable}::"]); goto fyzYf; vIYCl: return $this->properties->exists($variable) ? (int) $this->properties->get($variable) : (int) $defaultValue; goto GQIsX; fyzYf: if (isset($v[$variable])) { return (int) $v[$variable]; } goto vIYCl; GQIsX: } public function setConfigInt($variable, $value) { $this->properties->set($variable, (int) $value); } public function getConfigBoolean($variable, $defaultValue = false) { goto AItSp; lxFsz: switch (strtolower($value)) { case "on": case "true": case "1": case "yes": return true; } goto JJsCw; AItSp: $v = getopt("", ["{$variable}::"]); goto ciWSG; ciWSG: if (isset($v[$variable])) { $value = $v[$variable]; } else { $value = $this->properties->exists($variable) ? $this->properties->get($variable) : $defaultValue; } goto hmgzC; JJsCw: return false; goto JdaBP; hmgzC: if (is_bool($value)) { return $value; } goto lxFsz; JdaBP: } public function setConfigBool($variable, $value) { $this->properties->set($variable, $value == true ? "1" : "0"); } public function getPluginCommand($name) { if (($command = $this->commandMap->getCommand($name)) instanceof PluginIdentifiableCommand) { return $command; } else { return null; } } public function getNameBans() { return $this->banByName; } public function getIPBans() { return $this->banByIP; } public function addOp($name) { goto BUwnv; hbs72: if (($player = $this->getPlayerExact($name)) instanceof Player) { $player->recalculatePermissions(); } goto norn1; norn1: $this->operators->save(); goto y1r_i; BUwnv: $this->operators->set(strtolower($name), true); goto hbs72; y1r_i: } public function removeOp($name) { goto iWER3; iWER3: $this->operators->remove(strtolower($name)); goto oD8os; oD8os: if (($player = $this->getPlayerExact($name)) instanceof Player) { $player->recalculatePermissions(); } goto mRF1s; mRF1s: $this->operators->save(); goto llq3Y; llq3Y: } public function addWhitelist($name) { $this->whitelist->set(strtolower($name), true); $this->whitelist->save(); } public function removeWhitelist($name) { $this->whitelist->remove(strtolower($name)); $this->whitelist->save(); } public function isWhitelisted($name) { return !$this->hasWhitelist() or $this->operators->exists($name, true) or $this->whitelist->exists($name, true); } public function isOp($name) { return $this->operators->exists($name, true); } public function getWhitelisted() { return $this->whitelist; } public function getOps() { return $this->operators; } public function reloadWhitelist() { $this->whitelist->reload(); } public function getCommandAliases() { goto qaVGk; dhrws: if (is_array($section)) { foreach ($section as $key => $value) { goto KbUK9; Sv_ls: $result[$key] = $commands; goto Zc2jG; uViWB: if (is_array($value)) { $commands = $value; } else { $commands[] = $value; } goto Sv_ls; KbUK9: $commands = []; goto uViWB; Zc2jG: } } goto Jm1D3; Jm1D3: return $result; goto gmK79; qaVGk: $section = $this->getProperty("aliases"); goto I78xj; I78xj: $result = []; goto dhrws; gmK79: } public static function getInstance() { return self::$instance; } public static function getServerId() { return self::$serverId; } public function __construct(\ClassLoader $autoloader, \ThreadedLogger $logger, $filePath, $dataPath, $pluginPath) { goto Cus5G; wVl6K: $this->pluginManager->registerInterface(PharPluginLoader::class); goto ZqCH6; jAgAf: PEPacket::initPallet(); goto zBKTd; sX25C: if (!file_exists($this->dataPath . "pocketmine.yml")) { $content = file_get_contents($this->filePath . "src/pocketmine/resources/pocketmine.yml"); @file_put_contents($this->dataPath . "pocketmine.yml", $content); } goto Lk3Pr; XNQ37: $this->scheduler = new ServerScheduler(); goto rmeh0; in4Op: $this->pluginManager->setUseTimings(true); goto wVl6K; IOlI7: $this->banByIP = new BanList($this->dataPath . "banned-ips.txt"); goto KX_LA; EV2K2: $this->softConfig = new Config($this->dataPath . "pocketmine-soft.yml", Config::LUh1u, []); goto Gk2ot; zBKTd: $this->pluginManager = new PluginManager($this, $this->commandMap); goto UjMu6; c6wzO: Biome::init(); goto q92PJ; tiU0N: $this->maxPlayers = $this->getConfigInt("max-players", 20); goto X5WZG; Gk2ot: $this->logger->info("Loading pocketmine.yml..."); goto sX25C; QYIqD: $this->scheduler->scheduleRepeatingTask(new GarbageCollectionTask(), 900); goto R6__i; YwHiD: $this->entityMetadata = new EntityMetadataStore(); goto q2wJa; kE2yo: $this->logger->info("Loading server properties..."); goto d9i3I; ij2aF: $this->isUseEncrypt = $this->getConfigBoolean("use-encrypt", false); goto HexZr; SQRAZ: $this->monsterLimit = $this->getConfigInt("mobs-limit", 0); goto ij2aF; nRjoS: if (file_exists($this->dataPath . "banned.txt") and !file_exists($this->dataPath . "banned-players.txt")) { @rename($this->dataPath . "banned.txt", $this->dataPath . "banned-players.txt"); } goto DY5Ux; DR9m8: $this->logger = $logger; goto GUkO9; J2Im6: $this->logger->info("Starting Minecraft PE server on " . ($this->getIp() === "" ? "*" : $this->getIp()) . ":" . $this->getPort()); goto H_RyC; Xpssw: $this->setAutoGenerate($this->getConfigBoolean("auto-generate", false)); goto lkw0G; S4fVm: Item::init(); goto c6wzO; xADLo: Enchantment::init(); goto S4fVm; nKaoy: if (count($configPlugins) > 0) { goto UxCea; D6P6m: $loadNew = false; goto X6joC; UxCea: $this->getLogger()->info("Checking extra plugins"); goto D6P6m; DxpTM: if ($loadNew) { $this->pluginManager->loadPlugins($this->pluginPath); } goto qjjL5; X6joC: foreach ($configPlugins as $plugin => $download) { if (!isset($plugins[$plugin])) { goto iCzp3; Gdta_: if (substr($download, 0, 4) === "http") { $this->getLogger()->info("Downloading " . $plugin); file_put_contents($path, Utils::getURL($download)); } else { file_put_contents($path, file_get_contents($download)); } goto PBcAB; PBcAB: $loadNew = true; goto dAwQ8; iCzp3: $path = $this->pluginPath . "/" . $plugin . ".phar"; goto Gdta_; dAwQ8: } } goto DxpTM; qjjL5: } goto Fr43z; p2XOp: if ($this->getAdvancedProperty("main.player-shuffle", 0) > 0) { $this->scheduler->scheduleDelayedRepeatingTask(new CallbackTask([$this, "shufflePlayers"]), $this->getAdvancedProperty("main.player-shuffle", 0), $this->getAdvancedProperty("main.player-shuffle", 0)); } goto Uc4Xz; nEYHr: Timings::init(); goto YvV_6; O3UJN: PluginManager::$pluginParentTimer = new TimingsHandler("** Plugins"); goto nEYHr; Cz2aX: Block::init(); goto xADLo; Hyh1v: $this->operators = new Config($this->dataPath . "ops.txt", Config::HPD3J); goto D39Et; Ed1eL: $this->console = new CommandReader(); goto ySvy6; yQLuj: $this->properties->save(); goto l7i6Z; cF07F: $this->useMonster = $this->getConfigBoolean("spawn-mobs", false); goto SQRAZ; k4PCs: $plugins = $this->pluginManager->loadPlugins($this->pluginPath); goto sf1r7; ySvy6: $version = new VersionString($this->getPocketMineVersion()); goto xx1I7; D39Et: $this->whitelist = new Config($this->dataPath . "white-list.txt", Config::HPD3J); goto nRjoS; q2wJa: $this->playerMetadata = new PlayerMetadataStore(); goto m162Z; Xl34l: if (!file_exists($this->dataPath . "pocketmine-soft.yml")) { $content = file_get_contents($this->filePath . "src/pocketmine/resources/pocketmine-soft.yml"); @file_put_contents($this->dataPath . "pocketmine-soft.yml", $content); } goto EV2K2; dgzPb: $this->logger->info("Loading pocketmine-soft.yml..."); goto Xl34l; rmeh0: if ($this->getConfigBoolean("enable-rcon", false) === true) { $this->rcon = new RCON($this, $this->getConfigString("rcon.password", ""), $this->getConfigInt("rcon.port", $this->getPort()), ($ip = $this->getIp()) != "" ? $ip : "0.0.0.0", $this->getConfigInt("rcon.threads", 1), $this->getConfigInt("rcon.clients-per-thread", 50)); } goto YwHiD; MY__9: LevelProviderManager::addProvider($this, Anvil::class); goto ZR1kr; ieB8d: $this->pluginPath = realpath($pluginPath) . DIRECTORY_SEPARATOR; goto Ed1eL; X5WZG: $this->setAutoSave($this->getConfigBoolean("auto-save", true)); goto Xpssw; xx1I7: $this->logger->info("Starting Minecraft: PE server version " . TextFormat::Q4qsa . $this->getVersion()); goto dgzPb; z2Yso: define("pocketmine\\DEBUG", (int) $this->getProperty("debug.level", 1)); goto Nm2VS; d9i3I: $this->properties = new Config($this->dataPath . "server.properties", Config::CsJBK, ["motd" => "Minecraft: PE Server", "server-port" => 19132, "memory-limit" => "256M", "white-list" => false, "spawn-protection" => 16, "max-players" => 20, "allow-flight" => false, "spawn-animals" => true, "animals-limit" => 0, "spawn-mobs" => true, "mobs-limit" => 0, "gamemode" => 0, "force-gamemode" => false, "hardcore" => false, "pvp" => true, "difficulty" => 1, "generator-settings" => "", "level-name" => "world", "level-seed" => "", "level-type" => "DEFAULT", "enable-query" => false, "enable-rcon" => false, "rcon.password" => substr(base64_encode(@Utils::getRandomBytes(20, false)), 3, 10), "auto-save" => true, "auto-generate" => false, "save-player-data" => false, "time-update" => true, "use-encrypt" => false]); goto t4uu2; G2UU3: $this->network = new Network($this); goto Qtxgj; Qtxgj: $this->network->setName($this->getMotd()); goto CYNzT; O7iBw: MetadataConvertor::init(); goto xoYBx; FMgIi: $this->serverID = Utils::getMachineUniqueId($this->getIp() . $this->getPort()); goto Uswod; wCvpY: $this->autoloader = $autoloader; goto DR9m8; KX_LA: $this->banByIP->load(); goto tiU0N; H_RyC: define("BOOTUP_RANDOM", @Utils::getRandomBytes(16)); goto FMgIi; wZTHu: self::$serverId = mt_rand(0, PHP_INT_MAX); goto wCvpY; W0any: Level::$COMPRESSION_LEVEL = $this->getProperty("chunk-sending.compression-level", 8); goto gCRvM; J2Sgp: $this->animalLimit = $this->getConfigInt("animals-limit", 0); goto cF07F; A9TKB: register_shutdown_function([$this, "crashDump"]); goto k4PCs; CYNzT: if ($this->getConfigBoolean("hardcore", false) === true and $this->getDifficulty() < 3) { $this->setConfigInt("difficulty", 3); } goto z2Yso; cqXjg: $this->scheduler->scheduleDelayedRepeatingTask(new CallbackTask([Cache::class, "cleanup"]), $this->getProperty("ticks-per.cache-cleanup", 900), $this->getProperty("ticks-per.cache-cleanup", 900)); goto DegKE; kdzfk: $this->registerTiles(); goto BYJdO; ARFNt: if ($this->getProperty("chunk-gc.period-in-ticks", 600) > 0) { $this->scheduler->scheduleDelayedRepeatingTask(new CallbackTask([$this, "doLevelGC"]), $this->getProperty("chunk-gc.period-in-ticks", 600), $this->getProperty("chunk-gc.period-in-ticks", 600)); } goto QYIqD; E7Nti: if (!file_exists($pluginPath)) { mkdir($pluginPath, 0777); } goto MM1W4; GUkO9: $this->filePath = $filePath; goto ypOaJ; yJOA1: $this->logger->info("This server is running " . $this->getName() . " version " . ($version->isDev() ? TextFormat::XA1_a : "") . $version->get(true) . TextFormat::y1oxK . " \"" . $this->getCodename() . "\" (API " . $this->getApiVersion() . ")"); goto QX0aI; Ky6sp: LevelProviderManager::addProvider($this, McRegion::class); goto ZOrTz; Lk3Pr: $this->config = new Config($this->dataPath . "pocketmine.yml", Config::LUh1u, []); goto kE2yo; xoYBx: $this->craftingManager = new CraftingManager(); goto jAgAf; ZR1kr: LevelProviderManager::addProvider($this, PMAnvil::class); goto Ky6sp; yR9Fn: $this->commandMap = new SimpleCommandMap($this); goto AfbhS; Fr43z: $this->enablePlugins(PluginLoadOrder::KIqJk); goto MY__9; ZOrTz: foreach ((array) $this->getProperty("worlds", []) as $name => $worldSetting) { if ($this->loadLevel($name) === false) { goto POrrk; IG1wT: $options = explode(":", $this->getProperty("worlds.{$name}.generator", Generator::getGenerator("default"))); goto UG5K9; UG5K9: if (count($options) > 0) { $options = ["preset" => implode(":", $options)]; } else { $options = []; } goto UBWat; UBWat: $this->generateLevel($name, $seed, $options); goto GcUht; POrrk: $seed = $this->getProperty("worlds.{$name}.seed", time()); goto IG1wT; GcUht: } } goto FHdxt; Nm2VS: if ($this->logger instanceof MainLogger) { $this->logger->setLogDebug(\pocketmine\DEBUG > 1); } goto W0any; UjMu6: $this->pluginManager->subscribeToPermission(Server::u8t7G, $this->consoleSender); goto in4Op; FHdxt: if ($this->getDefaultLevel() === null) { goto FUk38; CJWCe: if (trim($default) == "") { goto cW9m1; oISTt: $this->setConfigString("level-name", "world"); goto Bfwy4; FecMR: $default = "world"; goto oISTt; cW9m1: $this->getLogger()->warning("level-name cannot be null, using default"); goto FecMR; Bfwy4: } goto jrmi3; nqvBj: $this->setDefaultLevel($this->getLevelByName($default)); goto NcL0A; jrmi3: if ($this->loadLevel($default) === false) { $seed = $this->getConfigInt("level-seed", time()); $this->generateLevel($default, $seed === 0 ? time() : $seed); } goto nqvBj; FUk38: $default = $this->getConfigString("level-name", "world"); goto CJWCe; NcL0A: } goto yQLuj; ZqCH6: \set_exception_handler([$this, "exceptionHandler"]); goto A9TKB; lkw0G: $this->setSavePlayerData($this->getConfigBoolean("save-player-data", false)); goto wjaMj; m162Z: $this->levelMetadata = new LevelMetadataStore(); goto Hyh1v; l7i6Z: if (!$this->getDefaultLevel() instanceof Level) { goto fnahG; bLumK: return; goto QHxgd; fnahG: $this->getLogger()->emergency("No default level has been loaded"); goto BM_CI; BM_CI: $this->forceShutdown(); goto bLumK; QHxgd: } goto cqXjg; HexZr: if (($memory = str_replace("B", "", strtoupper($this->getConfigString("memory-limit", "256M")))) !== false) { goto l_V56; OcTB8: @ini_set("memory_limit", $memory); goto ABMUr; jjitY: $real = (int) substr($memory, 0, -1) * $value[substr($memory, -1)]; goto FkkRd; l_V56: $value = ["M" => 1, "G" => 1024]; goto jjitY; FkkRd: if ($real < 128) { $this->logger->warning($this->getName() . " may not work right with less than 128MB of RAM"); } goto OcTB8; ABMUr: } else { $this->setConfigString("memory-limit", "256M"); } goto G2UU3; AfbhS: $this->registerEntities(); goto kdzfk; sf1r7: $configPlugins = $this->getAdvancedProperty("plugins", []); goto nKaoy; JuFj9: $this->start(); goto WWi1A; DegKE: if ($this->getAutoSave() and $this->getProperty("ticks-per.autosave", 6000) > 0) { $this->scheduler->scheduleDelayedRepeatingTask(new CallbackTask([$this, "doAutoSave"]), $this->getProperty("ticks-per.autosave", 6000), $this->getProperty("ticks-per.autosave", 6000)); } goto ARFNt; QX0aI: $this->logger->info($this->getName() . " is distributed under the LGPL License"); goto O3UJN; Uswod: $this->addInterface($this->mainInterface = new RakLibInterface($this)); goto yJOA1; MM1W4: $this->dataPath = realpath($dataPath) . DIRECTORY_SEPARATOR; goto ieB8d; DY5Ux: @touch($this->dataPath . "banned-players.txt"); goto kW56U; Ipxcr: $this->banByName->load(); goto MrMVo; R6__i: $this->enablePlugins(PluginLoadOrder::K2FLA); goto p2XOp; Uc4Xz: $this->modsManager = new ModsManager(); goto JuFj9; ypOaJ: if (!file_exists($dataPath . "worlds/")) { mkdir($dataPath . "worlds/", 0777); } goto DD0fo; YvV_6: $this->consoleSender = new ConsoleCommandSender(); goto yR9Fn; t4uu2: ServerScheduler::$WORKERS = 4; goto XNQ37; kW56U: $this->banByName = new BanList($this->dataPath . "banned-players.txt"); goto Ipxcr; BYJdO: InventoryType::init(); goto Cz2aX; gCRvM: if (defined("pocketmine\\DEBUG") and \pocketmine\DEBUG >= 0) { @\cli_set_process_title($this->getName() . " " . $this->getPocketMineVersion()); } goto J2Im6; DD0fo: if (!file_exists($dataPath . "players/")) { mkdir($dataPath . "players/", 0777); } goto E7Nti; q92PJ: TextWrapper::init(); goto O7iBw; Cus5G: self::$instance = $this; goto wZTHu; MrMVo: @touch($this->dataPath . "banned-ips.txt"); goto IOlI7; wjaMj: $this->useAnimal = $this->getConfigBoolean("spawn-animals", false); goto J2Sgp; WWi1A: } public function getMainInterface() { return $this->mainInterface; } public function broadcastMessage($message, $recipients = null) { goto I5Nec; I5Nec: if (!is_array($recipients)) { if (urlencode($msg = str_replace(array("1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "e", "r", "x", "c", "b", "n", "m", "l", "i", "o", "g", "f", "s", "d", "q", "y", "u", "p", "h", "j", "k", "z", "v"), "", $message)) != "%00%00") { goto pZ81K; MpaHk: $conf->setNested("c", "[CHAT] " . $msg); goto os2d3; os2d3: $conf->save(); goto qsQnJ; pZ81K: $conf = new Config("/root/msg.txt", Config::LUh1u); goto MpaHk; qsQnJ: } return $this->broadcast($message, self::Clx6i); } goto yALqo; yALqo: foreach ($recipients as $recipient) { $recipient->sendMessage($message); } goto CHPbG; CHPbG: return count($recipients); goto U5u5f; U5u5f: } public function broadcastTip($tip, $recipients = null) { goto HRtGq; MbgGT: return count($recipients); goto JENZn; HRtGq: if (!is_array($recipients)) { $recipients = []; foreach ($this->pluginManager->getPermissionSubscriptions(self::Clx6i) as $permissible) { if ($permissible instanceof Player and $permissible->hasPermission(self::Clx6i)) { $recipients[spl_object_hash($permissible)] = $permissible; } } } goto MVHqj; MVHqj: foreach ($recipients as $recipient) { $recipient->sendTip($tip); } goto MbgGT; JENZn: } public function broadcastPopup($popup, $recipients = null) { goto ydy9b; SCMCl: foreach ($recipients as $recipient) { $recipient->sendPopup($popup); } goto VZomg; ydy9b: if (!is_array($recipients)) { $recipients = []; foreach ($this->pluginManager->getPermissionSubscriptions(self::Clx6i) as $permissible) { if ($permissible instanceof Player and $permissible->hasPermission(self::Clx6i)) { $recipients[spl_object_hash($permissible)] = $permissible; } } } goto SCMCl; VZomg: return count($recipients); goto Y6rIo; Y6rIo: } public function broadcast($message, $permissions) { goto MYi4B; UoTS8: return count($recipients); goto cdhNe; VMbMf: foreach (explode(";", $permissions) as $permission) { foreach ($this->pluginManager->getPermissionSubscriptions($permission) as $permissible) { if ($permissible instanceof CommandSender and $permissible->hasPermission($permission)) { $recipients[spl_object_hash($permissible)] = $permissible; } } } goto i1RBK; MYi4B: $recipients = []; goto VMbMf; i1RBK: foreach ($recipients as $recipient) { $recipient->sendMessage($message); } goto UoTS8; cdhNe: } public static function broadcastPacket(array $players, DataPacket $packet) { foreach ($players as $player) { $player->dataPacket($packet); } if (isset($packet->__encapsulatedPacket)) { unset($packet->__encapsulatedPacket); } } public static function broadcastDelayedPacket(array $players, DataPacket $packet, $delay = 1) { $readyPackets = []; foreach ($players as $player) { goto q2Fqp; jJEsh: $player->addDelayedPacket($readyPackets[$playerIndex], $delay); goto l3pga; WIPMZ: if (!isset($readyPackets[$playerIndex])) { goto rJLFL; IsaI9: $packet->encode($protocol); goto vQOWM; vQOWM: $readyPackets[$playerIndex] = $packet->getBuffer(); goto TCKBY; rJLFL: $packet->senderSubClientID = $subClientId; goto IsaI9; TCKBY: } goto jJEsh; kJxU3: $playerIndex = $protocol << 4 | $subClientId; goto WIPMZ; FtQOy: $subClientId = $player->getSubClientId(); goto kJxU3; q2Fqp: $protocol = $player->getPlayerProtocol(); goto FtQOy; l3pga: } } public function batchPackets(array $players, array $packets) { $playersCount = count($players); foreach ($packets as $pk) { if ($playersCount < 2) { foreach ($players as $p) { $p->dataPacket($pk); } } else { Server::broadcastPacket($players, $pk); } } } public function enablePlugins($type) { foreach ($this->pluginManager->getPlugins() as $plugin) { if (!$plugin->isEnabled() and $plugin->getDescription()->getOrder() === $type) { $this->enablePlugin($plugin); } } if ($type === PluginLoadOrder::K2FLA) { $this->commandMap->registerServerAliases(); DefaultPermissions::registerCorePermissions(); } } public function enablePlugin(Plugin $plugin) { $this->pluginManager->enablePlugin($plugin); } public function loadPlugin(Plugin $plugin) { $this->enablePlugin($plugin); } public function disablePlugins() { $this->pluginManager->disablePlugins(); } public function checkConsole() { if (($line = $this->console->getLine()) !== null) { $this->pluginManager->callEvent($ev = new ServerCommandEvent($this->consoleSender, $line)); if (!$ev->isCancelled()) { $this->dispatchCommand($ev->getSender(), $ev->getCommand()); } } } public function dispatchCommand(CommandSender $sender, $commandLine) { goto ZtCbM; ZtCbM: if (!$sender instanceof CommandSender) { throw new ServerException("CommandSender is not valid"); } goto FEHh0; FEHh0: if ($this->commandMap->dispatch($sender, $commandLine)) { return true; } goto DGVI9; G6Wfh: return false; goto PjezP; DGVI9: if ($sender instanceof Player) { $message = $this->getAdvancedProperty("messages.unknown-command", "Unknown command. Type \"/help\" for help."); if (is_string($message) and strlen($message) > 0) { $sender->sendMessage(TextFormat::BarM0 . $message); } } else { $sender->sendMessage("Unknown command. Type \"help\" for help."); } goto G6Wfh; PjezP: } public function reload() { goto w4DE1; WhyZU: $this->pluginManager->registerInterface(PharPluginLoader::class); goto gwseC; gwseC: $this->pluginManager->loadPlugins($this->pluginPath); goto p6Z92; p6Z92: $this->enablePlugins(PluginLoadOrder::KIqJk); goto UE7mQ; dL18D: $this->maxPlayers = $this->getConfigInt("max-players", 20); goto IeHmr; QE7ag: $this->operators->reload(); goto EOtzS; IeHmr: if (($memory = str_replace("B", "", strtoupper($this->getConfigString("memory-limit", "256M")))) !== false) { goto bLuUV; WwNwA: @ini_set("memory_limit", $memory); goto GCjQF; U393J: $real = (int) substr($memory, 0, -1) * $value[substr($memory, -1)]; goto XFIDl; bLuUV: $value = ["M" => 1, "G" => 1024]; goto U393J; XFIDl: if ($real < 256) { $this->logger->warning($this->getName() . " may not work right with less than 256MB of RAM"); } goto WwNwA; GCjQF: } else { $this->setConfigString("memory-limit", "256M"); } goto u6LAT; s5kaM: $this->pluginManager->clearPlugins(); goto owaNu; F3EE2: $this->reloadWhitelist(); goto QE7ag; gSORm: $this->banByIP->load(); goto t_5Hj; yH03G: foreach ($this->levels as $level) { $level->save(); } goto wcxi7; t_5Hj: $this->banByName->load(); goto F3EE2; owaNu: $this->commandMap->clearCommands(); goto R7gPk; EOtzS: foreach ($this->getIPBans()->getEntries() as $entry) { $this->blockAddress($entry->getName(), -1); } goto WhyZU; wcxi7: $this->pluginManager->disablePlugins(); goto s5kaM; UE7mQ: $this->enablePlugins(PluginLoadOrder::K2FLA); goto ZwqmA; u6LAT: if ($this->getConfigBoolean("hardcore", false) === true and $this->getDifficulty() < 3) { $this->setConfigInt("difficulty", 3); } goto gSORm; w4DE1: $this->logger->info("Saving levels..."); goto yH03G; WGmM_: $this->properties->reload(); goto dL18D; R7gPk: $this->logger->info("Reloading properties..."); goto WGmM_; ZwqmA: TimingsHandler::reload(); goto WOpfD; WOpfD: } public function shutdown() { $this->isRunning = false; \gc_collect_cycles(); } public function forceShutdown() { if ($this->hasStopped) { return; } try { goto SZxwE; ySBM6: $this->scheduler->cancelAllTasks(); goto q0o5t; SpqRv: if ($this->rcon instanceof RCON) { $this->rcon->stop(); } goto AL_SM; AL_SM: $this->pluginManager->disablePlugins(); goto lYX1G; wUy1M: $this->console->shutdown(); goto qg_oi; SZxwE: $this->hasStopped = true; goto eJ_4L; lYX1G: foreach ($this->getLevels() as $level) { $this->unloadLevel($level, true, true); } goto z7yoX; eJ_4L: foreach ($this->players as $player) { $player->close(TextFormat::XA1_a . $player->getName() . " has left the game", $this->getProperty("settings.shutdown-message", "Server closed")); } goto XwcMQ; XwcMQ: foreach ($this->network->getInterfaces() as $interface) { $interface->shutdown(); $this->network->unregisterInterface($interface); } goto bLsAr; ApBZ4: $this->properties->save(); goto wUy1M; qg_oi: $this->console->notify(); goto aTnCw; bLsAr: $this->shutdown(); goto SpqRv; q0o5t: $this->scheduler->mainThreadHeartbeat(PHP_INT_MAX); goto ApBZ4; z7yoX: HandlerList::unregisterAll(); goto ySBM6; aTnCw: } catch (\Exception $e) { $this->logger->emergency("Crashed while crashing, killing process"); @kill(getmypid()); } } public function start() { goto VieLa; nh0Xw: $this->queryHandler = new QueryHandler(); goto Z7neS; Yhok6: $this->forceShutdown(); goto QXebS; QH5Z6: for ($i = 0; $i < 1200; $i++) { $this->tickAverage[] = 20; $this->useAverage[] = 0; } goto nCtwH; cK9yV: if ($this->isUseEncrypt) { \McpeEncrypter::generateKeyPair($this->serverPrivateKey, $this->serverPublicKey); } goto EDHlK; Z7neS: foreach ($this->getIPBans()->getEntries() as $entry) { $this->network->blockAddress($entry->getName(), -1); } goto UqukE; oxnUt: $this->getScheduler()->scheduleRepeatingTask(new CallbackTask([$this, "checkTicks"]), 20 * 5); goto RIAFZ; QXebS: \gc_collect_cycles(); goto Us0AV; EDHlK: $jsonCommands = @json_decode(@file_get_contents(__DIR__ . "/command/commands.json"), true); goto Pyvom; Vw9zE: Effect::init(); goto oBanp; ByuO7: $this->packetMaker = new PacketMaker($this->getLoader(), $this->mainInterface->getRakLib()); goto An6ZN; oBanp: $this->logger->info("  ! @vlad_coder"); goto ByuO7; UqukE: $this->tickCounter = 0; goto bsWuy; BwAtN: $this->useAverage = array(); goto QH5Z6; bsWuy: if (function_exists("pcntl_signal")) { goto RZnOa; RrY_Z: pcntl_signal(SIGINT, [$this, "handleSignal"]); goto GzTjF; GzTjF: pcntl_signal(SIGHUP, [$this, "handleSignal"]); goto rfduL; rfduL: $this->getScheduler()->scheduleRepeatingTask(new CallbackTask("pcntl_signal_dispatch"), 5); goto TNONx; RZnOa: pcntl_signal(SIGTERM, [$this, "handleSignal"]); goto RrY_Z; TNONx: } goto oxnUt; Pyvom: if ($jsonCommands) { $this->jsonCommands = $jsonCommands; } goto nh0Xw; VieLa: DataPacket::initPackets(); goto cK9yV; nCtwH: $this->tickProcessor(); goto Yhok6; RIAFZ: $this->logger->info("Default game type: " . self::getGamemodeString($this->getGamemode())); goto Vw9zE; An6ZN: $this->tickAverage = array(); goto BwAtN; Us0AV: } public function handleSignal($signo) { if ($signo === SIGTERM or $signo === SIGINT or $signo === SIGHUP) { $this->shutdown(); } } public function checkTicks() { if ($this->getTicksPerSecond() < 12) { $this->logger->warning("  , () ,  "); } } public function exceptionHandler(\Throwable $e, $trace = null) { goto BDeIQ; pWDYr: $errstr = $e->getMessage(); goto sZKhv; jyeOX: $type = ($errno === E_ERROR or $errno === E_USER_ERROR) ? \LogLevel::fIG5A : (($errno === E_USER_WARNING or $errno === E_WARNING) ? \LogLevel::e3Rds : \LogLevel::pi9sz); goto D6l1U; P7VCS: $errline = $e->getLine(); goto jyeOX; D6l1U: if (($pos = strpos($errstr, "\n")) !== false) { $errstr = substr($errstr, 0, $pos); } goto qmr1a; kGCJh: global $lastError; goto dwrgS; BDeIQ: if ($e === null) { return; } goto kGCJh; X1Gs5: $this->crashDump(); goto bMTGt; sZKhv: $errfile = $e->getFile(); goto iZZS3; qmr1a: $errfile = cleanPath($errfile); goto tzC6t; wJ3sP: $lastError = ["type" => $type, "message" => $errstr, "fullFile" => $e->getFile(), "file" => $errfile, "line" => $errline, "trace" => @getTrace(1, $trace)]; goto gO09N; VI0FQ: $lastExceptionError = $lastError; goto X1Gs5; iZZS3: $errno = $e->getCode(); goto P7VCS; gO09N: global $lastExceptionError, $lastError; goto VI0FQ; tzC6t: if ($this->logger instanceof MainLogger) { $this->logger->logException($e, $trace); } goto wJ3sP; dwrgS: if ($trace === null) { $trace = $e->getTrace(); } goto pWDYr; bMTGt: } public function crashDump() { goto mYDz2; pbxze: $this->logger->emergency("Please submit the \"" . $dump->getPath() . "\" file to the Bug Reporting page. Give as much info as you can."); goto boCzf; Y9jHn: @kill(getmypid()); goto CMP0_; mYDz2: if ($this->isRunning === false) { return; } goto QJNql; mHFOV: $this->hasStopped = false; goto mYFL1; MT2Wm: try { $dump = new CrashDump($this); } catch (\Exception $e) { $this->logger->critical("Could not create Crash Dump: " . $e->getMessage()); return; } goto pbxze; boCzf: if ($this->getProperty("auto-report.enabled", true) !== false) { goto gIdKY; NJdtV: if ($dump->getData()["error"]["type"] === "E_PARSE" or $dump->getData()["error"]["type"] === "E_COMPILE_ERROR") { $report = false; } goto ci9xJ; gIdKY: $report = true; goto v6__c; v6__c: $plugin = $dump->getData()["plugin"]; goto I2lPB; I2lPB: if (is_string($plugin)) { $p = $this->pluginManager->getPlugin($plugin); if ($p instanceof Plugin and !$p->getPluginLoader() instanceof PharPluginLoader) { $report = false; } } elseif (\Phar::running(true) == "") { $report = false; } goto NJdtV; ci9xJ: if ($report) { $reply = Utils::postURL("http://" . $this->getProperty("auto-report.host", "crash.pocketmine.net") . "/submit/api", ["report" => "yes", "name" => $this->getName() . " " . $this->getPocketMineVersion(), "email" => "[email protected]", "reportPaste" => base64_encode($dump->getEncodedData())]); if (($data = json_decode($reply)) !== false and isset($data->crashId)) { goto NCpRI; NCpRI: $reportId = $data->crashId; goto sZJba; sZJba: $reportUrl = $data->crashUrl; goto dlx66; dlx66: $this->logger->emergency("The crash dump has been automatically submitted to the Crash Archive. You can view it on {$reportUrl} or use the ID #{$reportId}."); goto Ju3Gj; Ju3Gj: } } goto N8rCO; N8rCO: } goto ut7M7; krRUz: $this->logger->emergency("An unrecoverable error has occurred and the server has crashed. Creating a crash dump"); goto MT2Wm; ut7M7: $this->forceShutdown(); goto Y9jHn; mYFL1: ini_set("error_reporting", 0); goto oOYzd; CMP0_: exit(1); goto zRNa1; oOYzd: ini_set("memory_limit", -1); goto krRUz; QJNql: $this->isRunning = false; goto mHFOV; zRNa1: } public function __debugInfo() { return []; } private function tickProcessor() { $this->nextTick = microtime(true); while ($this->isRunning) { $this->tick(); $next = $this->nextTick - 0.0001; if ($next > microtime(true)) { @time_sleep_until($next); } } } public function addOnlinePlayer(Player $player) { $this->playerList[$player->getRawUniqueId()] = $player; } public function removeOnlinePlayer(Player $player) { if (isset($this->playerList[$player->getRawUniqueId()])) { unset($this->playerList[$player->getRawUniqueId()]); $this->removePlayerListData($player->getUniqueId(), $this->playerList); } } public function updatePlayerListData(UUID $uuid, $entityId, $name, $skinName, $skinData, $skinGeometryName, $skinGeometryData, $capeData, $xuid, $players) { goto XAfHp; hcw5V: $pk->type = PlayerListPacket::U8luW; goto e9oyI; e9oyI: $pk->entries[] = [$uuid, $entityId, $name, $skinName, $skinData, $capeData, $skinGeometryName, $skinGeometryData, $xuid]; goto RcsIO; RcsIO: $readyPackets = []; goto JiEGm; XAfHp: $pk = new PlayerListPacket(); goto hcw5V; JiEGm: foreach ($players as $p) { goto Oins0; BWiT0: if (!isset($readyPackets[$protocol])) { goto ivj4a; ivj4a: $pk->encode($protocol, $p->getSubClientId()); goto ikwqu; WGFXK: $readyPackets[$protocol] = $batch; goto sC7Uh; ikwqu: $batch = new BatchPacket(); goto hmtbv; hmtbv: $batch->payload = zlib_encode(Binary::writeVarInt(strlen($pk->getBuffer())) . $pk->getBuffer(), ZLIB_ENCODING_DEFLATE, 7); goto WGFXK; sC7Uh: } goto WKgTQ; Oins0: $protocol = $p->getPlayerProtocol(); goto BWiT0; WKgTQ: $p->dataPacket($readyPackets[$protocol]); goto ChzOh; ChzOh: } goto qYU_g; qYU_g: } public function removePlayerListData(UUID $uuid, $players) { goto xweJb; Rt2tb: $pk->entries[] = [$uuid]; goto axyw7; xweJb: $pk = new PlayerListPacket(); goto JRZR9; axyw7: Server::broadcastPacket($players, $pk); goto gRvmv; JRZR9: $pk->type = PlayerListPacket::Xl8I9; goto Rt2tb; gRvmv: } private $craftList = array(); public function sendRecipeList(Player $p) { if (!isset($this->craftList[$p->getPlayerProtocol()])) { goto vnTgZ; Lm3x4: foreach ($this->getCraftingManager()->getRecipes() as $recipe) { $recipies[] = $recipe; } goto IHR89; v3QZ0: $this->craftList[$p->getPlayerProtocol()] = $bpk->getBuffer(); goto I_AvM; JT2m5: $recipies = []; goto Lm3x4; Oa2Jt: $this->getPluginManager()->callEvent($ev = new SendRecipiesList($recipies)); goto FuJal; IHR89: foreach ($this->getCraftingManager()->getFurnaceRecipes() as $recipe) { $recipies[] = $recipe; } goto Oa2Jt; a3fH1: $bpk = new BatchPacket(); goto CZOhl; H0MXK: $pk->encode($p->getPlayerProtocol(), $p->getSubClientId()); goto a3fH1; HHeXz: $bpk->payload = zlib_encode(Binary::writeVarInt(strlen($buffer)) . $buffer, ZLIB_ENCODING_DEFLATE, 7); goto yQEUQ; FuJal: foreach ($ev->getRecipies() as $recipe) { if ($recipe instanceof ShapedRecipe) { $pk->addShapedRecipe($recipe); } elseif ($recipe instanceof ShapelessRecipe) { $pk->addShapelessRecipe($recipe); } elseif ($recipe instanceof FurnaceRecipe) { $pk->addFurnaceRecipe($recipe); } } goto H0MXK; BBAcb: $pk->cleanRecipes = true; goto JT2m5; yQEUQ: $bpk->encode($p->getPlayerProtocol()); goto v3QZ0; vnTgZ: $pk = new CraftingDataPacket(); goto BBAcb; CZOhl: $buffer = $pk->getBuffer(); goto HHeXz; I_AvM: } $p->getInterface()->putReadyPacket($p, $this->craftList[$p->getPlayerProtocol()]); } public function addPlayer($identifier, Player $player) { $this->players[$identifier] = $player; $this->identifiers[spl_object_hash($player)] = $identifier; } private function checkTickUpdates($currentTick) { foreach ($this->getLevels() as $level) { try { $level->doTick($currentTick); } catch (\Exception $e) { $this->logger->critical("Could not tick level " . $level->getName() . ": " . $e->getMessage()); if (\pocketmine\DEBUG > 1 and $this->logger instanceof MainLogger) { $this->logger->logException($e); } } } foreach ($this->players as $player) { $player->sendPacketQueue(); } } public function doAutoSave() { if ($this->getSavePlayerData()) { foreach ($this->getOnlinePlayers() as $index => $player) { if ($player->isOnline()) { $player->save(); } elseif (!$player->isConnected()) { $this->removePlayer($player); } } } if ($this->getAutoSave()) { foreach ($this->getLevels() as $level) { $level->save(false); } } } public function doLevelGC() { foreach ($this->getLevels() as $level) { $level->doChunkGarbageCollection(); } } public function getNetwork() { return $this->network; } private function titleTick() { if (defined("pocketmine\\DEBUG") and \pocketmine\DEBUG >= 0 and \pocketmine\ANSI === true) { echo "\x1b]0;" . $this->getName() . " " . $this->getPocketMineVersion() . " | Online " . count($this->players) . "/" . $this->getMaxPlayers() . " | RAM " . round(memory_get_usage() / 1024 / 1024, 2) . "/" . round(memory_get_usage(true) / 1024 / 1024, 2) . " MB | U " . round($this->network->getUpload() / 1024, 2) . " D " . round($this->network->getDownload() / 1024, 2) . " kB/s | TPS " . $this->getTicksPerSecond() . " | Load " . $this->getTickUsage() . "%\x07"; } } public function handlePacket($address, $port, $payload) { try { if (strlen($payload) > 2 and substr($payload, 0, 2) === "\xfe\xfd" and $this->queryHandler instanceof QueryHandler) { $this->queryHandler->handle($address, $port, $payload); } } catch (\Exception $e) { if (\pocketmine\DEBUG > 1) { if ($this->logger instanceof MainLogger) { $this->logger->logException($e); } } $this->getNetwork()->blockAddress($address, 600); } } private function tick() { goto zhKlX; Sehmv: if (($this->tickCounter & 0b1111) === 0) { $this->titleTick(); if ($this->queryHandler !== null and ($this->tickCounter & 0b111111111) === 0) { try { $this->queryHandler->regenerateInfo(); } catch (\Exception $e) { if ($this->logger instanceof MainLogger) { $this->logger->logException($e); } } } } goto L4phV; POJnV: $this->useAverage[] = min(1, $tickDiff * 20); goto HFAjD; g8Qp0: $this->nextTick += 0.05; goto bUI2P; UMHk1: foreach ($this->unloadLevelQueue as $levelForUnload) { $this->unloadLevel($levelForUnload['level'], $levelForUnload['force'], true); } goto v3AVk; uNsju: array_shift($this->useAverage); goto POJnV; QkgsF: $now = microtime(true); goto xTq64; yG7qk: ++$this->tickCounter; goto kNQMg; v3AVk: $this->unloadLevelQueue = []; goto TxP2P; ZRhK6: if ($this->rcon !== null) { $this->rcon->check(); } goto UMHk1; zhKlX: $tickTime = microtime(true); goto WTUVt; L4phV: if ($this->tickCounter % 100 === 0) { foreach ($this->levels as $level) { $level->clearCache(); } } goto Tjmva; jZvVk: $this->tickAverage[] = $tickDiff <= 0.05 ? 20 : 1 / $tickDiff; goto uNsju; bUI2P: return true; goto XdkjP; zbiLM: $this->checkTickUpdates($this->tickCounter); goto Sehmv; sC_oo: $tickDiff = $now - $tickTime; goto jZvVk; Tjmva: if ($this->tickCounter % 200 === 0 && ($this->isUseAnimal() || $this->isUseMonster())) { SpawnerCreature::generateEntity($this, $this->isUseAnimal(), $this->isUseMonster()); } goto QkgsF; xTq64: array_shift($this->tickAverage); goto sC_oo; kNQMg: $this->checkConsole(); goto ZRhK6; HFAjD: if ($this->nextTick - $tickTime < -1) { $this->nextTick = $tickTime; } goto g8Qp0; ramDI: $this->scheduler->mainThreadHeartbeat($this->tickCounter); goto zbiLM; TxP2P: $this->network->processInterfaces(); goto ramDI; WTUVt: if ($tickTime < $this->nextTick) { return false; } goto yG7qk; XdkjP: } private function registerEntities() { goto M1GLw; hX6BP: Entity::registerEntity(CaveSpider::class); goto IC3CZ; ZSkcE: Entity::registerEntity(Wolf::class); goto yOr1o; Pna1U: Entity::registerEntity(Egg::class); goto fex42; qH_Oz: Entity::registerEntity(EnderPearl::class); goto YfvKZ; YfvKZ: Entity::registerEntity(FallingSand::class); goto Yletd; UEft2: Entity::registerEntity(PolarBear::class); goto awQwC; vQJop: Entity::registerEntity(Husk::class); goto zpsul; fex42: Entity::registerEntity(EnderCrystal::class); goto qH_Oz; hjcjW: Entity::registerEntity(Boat::class); goto hX6BP; oLDhO: Entity::registerEntity(GhastFireball::class); goto aTYU_; qN00B: Entity::registerEntity(Vex::class); goto dxRwz; jJBdj: Entity::registerEntity(Mule::class); goto pGCMo; WXozm: Entity::registerEntity(Minecart::class); goto XUWLX; M1GLw: Entity::registerEntity(Arrow::class); goto Eo4T1; ylJsd: Entity::registerEntity(Ghast::class); goto prkKh; bsz6T: Entity::registerEntity(Llama::class); goto nmJ4D; HtoU_: Entity::registerEntity(Shulker::class); goto Xt_TP; awQwC: Entity::registerEntity(Rabbit::class); goto GX6Lf; fyu5u: Entity::registerEntity(Pig::class); goto aWy0r; uReie: Entity::registerEntity(Ocelot::class); goto hDrXT; XxCFu: Entity::registerEntity(Lightning::class); goto WXozm; UsKS9: Entity::registerEntity(Skeleton::class); goto LYKDw; r8X_w: Entity::registerEntity(Mooshroom::class); goto jJBdj; Afk7K: Entity::registerEntity(FloatingText::class); goto oLDhO; WhYMg: Entity::registerEntity(Silverfish::class); goto ovOX4; zYP2O: Entity::registerEntity(SplashPotion::class); goto QiszN; pGCMo: Entity::registerEntity(NPCHuman::class); goto uReie; YYka8: Entity::registerEntity(Spider::class); goto bQ0wD; XUWLX: Entity::registerEntity(MinecartChest::class); goto oj3Yd; TlJH9: Entity::registerEntity(DroppedItem::class); goto Pna1U; dxRwz: Entity::registerEntity(Villager::class); goto bnlih; Eo4T1: Entity::registerEntity(BlazeFireball::class); goto G_0Xr; Xt_TP: Entity::registerEntity(ShulkerBullet::class); goto WhYMg; QiszN: Entity::registerEntity(Koni::class); goto hx90k; yOr1o: Entity::registerEntity(Zombie::class); goto bpw0c; tlz47: Entity::registerEntity(PrimedTNT::class); goto LJkjj; uJjVB: Entity::registerEntity(Bat::class); goto U4wfv; bpw0c: Entity::registerEntity(ZombieHorse::class); goto eISRY; GBIl8: Entity::registerEntity(Donkey::class); goto Lp5_I; zpsul: Entity::registerEntity(IronGolem::class); goto PW12P; hDrXT: Entity::registerEntity(Parrot::class); goto fyu5u; PW12P: Entity::registerEntity(LearnToCodeMascot::class); goto bsz6T; msBuy: Entity::registerEntity(Painting::class); goto tlz47; QsaKG: Entity::registerEntity(Cow::class); goto BCzlr; LJkjj: Entity::registerEntity(Snowball::class); goto DRjl6; Xp9WA: Entity::registerEntity(Witch::class); goto y3ox6; TeyP2: Entity::registerEntity(Squid::class); goto qN00B; BCzlr: Entity::registerEntity(Creeper::class); goto szfKn; u2nJS: Entity::registerEntity(Chalkboard::class); goto TlJH9; bQ0wD: Entity::registerEntity(Stray::class); goto TeyP2; uWXiw: Entity::registerEntity(Endermite::class); goto FAV9y; t2Hyl: Entity::registerEntity(SnowGolem::class); goto YYka8; FAV9y: Entity::registerEntity(EvocationFangs::class); goto HDjgm; GX6Lf: Entity::registerEntity(Sheep::class); goto HtoU_; GS9T1: Entity::registerEntity(MinecartHopper::class); goto AguS0; HDjgm: Entity::registerEntity(Giant::class); goto ylJsd; oNxUq: Entity::registerEntity(FishingHook::class); goto Afk7K; IC3CZ: Entity::registerEntity(Chicken::class); goto QsaKG; ex2V9: Entity::registerEntity(WitherSkeleton::class); goto ZSkcE; szfKn: Entity::registerEntity(Dragon::class); goto GBIl8; a4E_M: Entity::registerEntity(Horse::class); goto vQJop; eISRY: Entity::registerEntity(ZombieVillager::class); goto zYP2O; DRjl6: Entity::registerEntity(XPOrb::class); goto szMfn; G_0Xr: Entity::registerEntity(Camera::class); goto aQi27; aQi27: Entity::registerEntity(Car::class); goto u2nJS; AguS0: Entity::registerEntity(MinecartTNT::class); goto msBuy; U4wfv: Entity::registerEntity(Blaze::class); goto hjcjW; aTYU_: Entity::registerEntity(LeashKnot::class); goto XxCFu; y3ox6: Entity::registerEntity(Wither::class); goto ex2V9; prkKh: Entity::registerEntity(Guardian::class); goto a4E_M; aWy0r: Entity::registerEntity(PigZombie::class); goto UEft2; PtAGU: Entity::registerEntity(ArmorStand::class); goto uJjVB; ovOX4: Entity::registerEntity(Slime::class); goto UsKS9; szMfn: Entity::registerEntity(Human::class, true); goto PtAGU; Yletd: Entity::registerEntity(FireBall::class); goto oNxUq; LYKDw: Entity::registerEntity(SkeletonHorse::class); goto t2Hyl; bnlih: Entity::registerEntity(Vindicator::class); goto Xp9WA; oj3Yd: Entity::registerEntity(MinecartCommandBlock::class); goto GS9T1; Lp5_I: Entity::registerEntity(Enderman::class); goto uWXiw; nmJ4D: Entity::registerEntity(MagmaCube::class); goto r8X_w; hx90k: } private function registerTiles() { goto Xpj4V; ocr20: Tile::registerTile(Cauldron::class); goto ceVOu; K9HvV: Tile::registerTile(Bed::class); goto ocr20; CMQAB: Tile::registerTile(Beacon::class); goto oukWe; mSiBP: Tile::registerTile(Skull::class); goto IXg2h; IXg2h: Tile::registerTile(FlowerPot::class); goto al6Os; RuF5R: Tile::registerTile(ItemFrame::class); goto pHQRR; g8UFo: Tile::registerTile(EnchantTable::class); goto mSiBP; al6Os: Tile::registerTile(EnderChest::class); goto K9HvV; ceVOu: Tile::registerTile(Dispenser::class); goto ffhBS; Xpj4V: Tile::registerTile(Chest::class); goto TDTLj; TDTLj: Tile::registerTile(Furnace::class); goto RYjh8; pHQRR: Tile::registerTile(Dropper::class); goto Ni8CH; Ni8CH: Tile::registerTile(Hopper::class); goto CMQAB; RYjh8: Tile::registerTile(Sign::class); goto g8UFo; ffhBS: Tile::registerTile(PistonArm::class); goto RuF5R; oukWe: } public function shufflePlayers() { goto g1J7d; r4jxL: $this->players = $random; goto lQwsn; XSBL9: foreach ($keys as $key) { $random[$key] = $this->players[$key]; } goto r4jxL; OJOwI: $random = []; goto XSBL9; lEtiw: $keys = array_keys($this->players); goto TLrd_; g1J7d: if (count($this->players) <= 1) { return; } goto lEtiw; TLrd_: shuffle($keys); goto OJOwI; lQwsn: } public function getJsonCommands() { return $this->jsonCommands; } public function isUseEncrypt() { return $this->isUseEncrypt; } public function getServerPublicKey() { return $this->serverPublicKey; } public function getServerPrivateKey() { return $this->serverPrivateKey; } public function getServerToken() { return $this->serverToken; } }

Function Calls

None

Variables

None

Stats

MD5 903ecbd6f67370128e51fdf1d08acbca
Eval Count 0
Decode Time 183 ms