diff --git a/Pocket/plugins/Mineplex/src/mineplex/plugin/Main.php b/Pocket/plugins/Mineplex/src/mineplex/plugin/Main.php index ae02ebc33..e9d7f1cd4 100644 --- a/Pocket/plugins/Mineplex/src/mineplex/plugin/Main.php +++ b/Pocket/plugins/Mineplex/src/mineplex/plugin/Main.php @@ -2,28 +2,29 @@ namespace mineplex\plugin; -use mineplex\plugin\core\updater\UpdateType; -use mineplex\plugin\tasks\TickTask; -use mineplex\plugin\events\TickEvent; -use mineplex\plugin\core\updater\Updater; -use mineplex\plugin\core\updater\UpdateEvent; -use mineplex\plugin\core\updater\UpdateType as UpdaterType; -use mineplex\plugin\util\UtilString; -use mineplex\plugin\packets\StrangePacket; -use pocketmine\plugin\PluginBase; +use mineplex\plugin\bench\arenas\SingleGameArena; +use mineplex\plugin\core\updater\UpdateEvent; +use mineplex\plugin\bench\game\games\pvp\Pvp; +use mineplex\plugin\packets\StrangePacket; +use mineplex\plugin\util\UtilString; use pocketmine\event\Listener; -use pocketmine\event\player\PlayerJoinEvent; use pocketmine\event\player\PlayerCommandPreprocessEvent; +use pocketmine\event\player\PlayerJoinEvent; +use pocketmine\plugin\PluginBase; +use pocketmine\Server; class Main extends PluginBase implements Listener { public function onEnable() { - $this->getServer()->getScheduler()->scheduleRepeatingTask(new TickTask($this), 1); + new SingleGameArena($this, new Pvp()); - $this->getServer()->getPluginManager()->registerEvents($this, $this); - new Updater($this); + + //$this->getServer()->getScheduler()->scheduleRepeatingTask(new TickTask($this), 1); + + //$this->getServer()->getPluginManager()->registerEvents($this, $this); + //new Updater($this); } public function onDisable() @@ -31,6 +32,15 @@ class Main extends PluginBase implements Listener } + public function joinMessage(PlayerJoinEvent $event) + { + $name = $event->getPlayer()->getName(); + + $player = Server::getInstance()->getPlayer($name); + + $event->setJoinMessage($player->getName()); + } + public function onPlayerJoin(PlayerJoinEvent $event) { $event->getPlayer()->sendMessage("Welcome to the server " . $event->getPlayer()->getName() . "!");