Skip to content
This repository was archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Added virion checks
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPigGuy committed Dec 6, 2019
1 parent 2442f20 commit 6da5470
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/DaPigGuy/PiggyBackpacks/PiggyBackpacks.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace DaPigGuy\PiggyBackpacks;

use muqsit\invmenu\InvMenu;
use muqsit\invmenu\InvMenuHandler;
use pocketmine\inventory\ShapedRecipe;
use pocketmine\item\Item;
Expand All @@ -22,6 +23,12 @@ class PiggyBackpacks extends PluginBase

public function onEnable(): void
{
if (!class_exists(InvMenu::class)) {
$this->getLogger()->error("InvMenu virion not found. Please download PiggyBackpacks from Poggit-CI or use DEVirion (not recommended).");
$this->getServer()->getPluginManager()->disablePlugin($this);
return;
}

if (!InvMenuHandler::isRegistered()) InvMenuHandler::register($this);

$this->saveDefaultConfig();
Expand Down

0 comments on commit 6da5470

Please sign in to comment.