Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace FlyParticles; use pocketmine\plugin\PluginBase; use pocketmine\even..
Decoded Output download
<?php
namespace FlyParticles;
use pocketmine\plugin\PluginBase;
use pocketmine\event\Listener;
use pocketmine\command\SimpleCommandMap;
use pocketmine\utils\Config;
use FlyParticles\commands\FlyCommand;
use FlyParticles\commands\FlySettingsCommand;
use FlyParticles\tasks\ParticleTask;
class FlyParticles extends PluginBase implements Listener {
public static $particleData = [];
public function onEnable(): void {
// Crear la carpeta del plugin si no existe
@mkdir($this->getDataFolder());
// Copiar el archivo config.yml si no existe
if (!file_exists($this->getDataFolder() . "config.yml")) {
$this->saveResource("config.yml");
}
// Registrar eventos
$this->getServer()->getPluginManager()->registerEvents($this, $this);
// Obtener el mapa de comandos
$commandMap = $this->getServer()->getCommandMap();
// Desregistrar comandos previamente registrados (si existen)
$registeredCommands = $commandMap->getCommands(); // Obtiene todos los comandos registrados
foreach ($registeredCommands as $command) {
if ($command->getName() === "fly" || $command->getName() === "flysettings") {
$commandMap->unregister($command); // Desregistra el comando
}
}
// Registrar comandos nuevamente
$commandMap->register("fly", new FlyCommand($this));
$commandMap->register("flysettings", new FlySettingsCommand($this));
// Iniciar la tarea de partculas
$this->getScheduler()->scheduleRepeatingTask(new ParticleTask($this), 5); // Cada 5 ticks
}
public function onDisable(): void {
// Guardar datos si es necesario
}
} ?>
Did this file decode correctly?
Original Code
<?php
namespace FlyParticles;
use pocketmine\plugin\PluginBase;
use pocketmine\event\Listener;
use pocketmine\command\SimpleCommandMap;
use pocketmine\utils\Config;
use FlyParticles\commands\FlyCommand;
use FlyParticles\commands\FlySettingsCommand;
use FlyParticles\tasks\ParticleTask;
class FlyParticles extends PluginBase implements Listener {
public static $particleData = [];
public function onEnable(): void {
// Crear la carpeta del plugin si no existe
@mkdir($this->getDataFolder());
// Copiar el archivo config.yml si no existe
if (!file_exists($this->getDataFolder() . "config.yml")) {
$this->saveResource("config.yml");
}
// Registrar eventos
$this->getServer()->getPluginManager()->registerEvents($this, $this);
// Obtener el mapa de comandos
$commandMap = $this->getServer()->getCommandMap();
// Desregistrar comandos previamente registrados (si existen)
$registeredCommands = $commandMap->getCommands(); // Obtiene todos los comandos registrados
foreach ($registeredCommands as $command) {
if ($command->getName() === "fly" || $command->getName() === "flysettings") {
$commandMap->unregister($command); // Desregistra el comando
}
}
// Registrar comandos nuevamente
$commandMap->register("fly", new FlyCommand($this));
$commandMap->register("flysettings", new FlySettingsCommand($this));
// Iniciar la tarea de partculas
$this->getScheduler()->scheduleRepeatingTask(new ParticleTask($this), 5); // Cada 5 ticks
}
public function onDisable(): void {
// Guardar datos si es necesario
}
}
Function Calls
None |
Stats
MD5 | 1cf78b100b73e8da538fd648bb1bd74a |
Eval Count | 0 |
Decode Time | 43 ms |