Skip to content

Commit

Permalink
🌿 Update Main.php
Browse files Browse the repository at this point in the history
  • Loading branch information
MyNET authored Apr 12, 2019
1 parent f749628 commit 17b3ce2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/idteller/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
class main extends PluginBase implements Listener{

public function onEnable(){
$this->server->getPluginManager()->registerEvents($this, $this);
$this->getLogger()->info(TextFormat::GREEN . "ID-Teller Loaded!");
self::$instance = $this;
Server::getInstance()->getLogger()->info(TextFormat::GREEN . "ID-Teller Loaded!");
Server::getInstance()->getPluginManager()->registerEvents($this, $this);
}

public function onDisable(){
$this->getLogger()->info(TextFormat::RED . "ID-Teller Disabled!");
$this->getLogger()->info(TextFormat::RED . "ID-Teller Disabled!");
}

public function onBreak(BlockBreakEvent $event){
Expand All @@ -44,4 +45,10 @@ public function onCommand(CommandSender $sender, Command $command, $label, array
}
return true;
}

public static function getInstance(){
return self::$instance;
}

public static $instance;
}

0 comments on commit 17b3ce2

Please sign in to comment.