Skip to content
This repository was archived by the owner on Feb 8, 2019. It is now read-only.

Commit 4111c92

Browse files
committed
register events
1 parent 745ba1b commit 4111c92

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/VectorNetworkProject/TheMix/TheMix.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use pocketmine\utils\TextFormat;
1414
use VectorNetworkProject\TheMix\command\PingCommand;
1515
use VectorNetworkProject\TheMix\command\TpsCommand;
16+
use VectorNetworkProject\TheMix\event\ThePlayerLoginEvent;
1617

1718
class TheMix extends PluginBase
1819
{
@@ -28,6 +29,7 @@ public function onLoad()
2829
public function onEnable()
2930
{
3031
$this->registerCommands();
32+
$this->registerEvents();
3133
$this->getLogger()->notice(TextFormat::AQUA . '
3234
3335
@@ -73,4 +75,10 @@ private function registerCommands(): void
7375
];
7476
$this->getServer()->getCommandMap()->registerAll($this->getName(), $commands);
7577
}
78+
79+
private function registerEvents(): void
80+
{
81+
$plm = $this->getServer()->getPluginManager();
82+
$plm->registerEvents(new ThePlayerLoginEvent(), $this);
83+
}
7684
}

0 commit comments

Comments
 (0)