Removing some useless left from before.
This commit is contained in:
parent
b7367eb4fd
commit
dd4c3d95e8
1 changed files with 16 additions and 18 deletions
|
@ -53,7 +53,6 @@ class Main extends PluginBase implements Listener{
|
||||||
echo str_repeat("\010", $downRP ? strlen(TextFormat::toANSI("§f[Spooky] ⚪ Downloading resource pack...")) : 0) . TextFormat::toANSI("§f[Spooky] ⚪ Applying resource pack... "); // Replacing latest message
|
echo str_repeat("\010", $downRP ? strlen(TextFormat::toANSI("§f[Spooky] ⚪ Downloading resource pack...")) : 0) . TextFormat::toANSI("§f[Spooky] ⚪ Applying resource pack... "); // Replacing latest message
|
||||||
$pack = new ZippedResourcePack($this->getDataFolder() . "Spooky.mcpack");
|
$pack = new ZippedResourcePack($this->getDataFolder() . "Spooky.mcpack");
|
||||||
$r = new \ReflectionClass("pocketmine\\resourcepacks\\ResourcePackManager");
|
$r = new \ReflectionClass("pocketmine\\resourcepacks\\ResourcePackManager");
|
||||||
if($pack instanceof \pocketmine\resourcepacks\ResourcePack){
|
|
||||||
// Reflection because devs thought it was a great idea to not let plugins manage resource packs :/
|
// Reflection because devs thought it was a great idea to not let plugins manage resource packs :/
|
||||||
$resourcePacks = $r->getProperty("resourcePacks");
|
$resourcePacks = $r->getProperty("resourcePacks");
|
||||||
$resourcePacks->setAccessible(true);
|
$resourcePacks->setAccessible(true);
|
||||||
|
@ -69,7 +68,6 @@ class Main extends PluginBase implements Listener{
|
||||||
$forceResources = $r->getProperty("serverForceResources");
|
$forceResources = $r->getProperty("serverForceResources");
|
||||||
$forceResources->setAccessible(true);
|
$forceResources->setAccessible(true);
|
||||||
$forceResources->setValue($this->getServer()->getResourceManager(), true);
|
$forceResources->setValue($this->getServer()->getResourceManager(), true);
|
||||||
}
|
|
||||||
echo str_repeat("\010", strlen("⚪ Applying resource pack... ")) . TextFormat::toANSI("§a✔️ Done! Spooky enabled! \n");
|
echo str_repeat("\010", strlen("⚪ Applying resource pack... ")) . TextFormat::toANSI("§a✔️ Done! Spooky enabled! \n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue