Switched it so it enables my game
Signed-off-by: Aaron Brock <TheMineBench@gmail.com>
This commit is contained in:
parent
fcedb4d6ba
commit
e3b0ee9ae3
@ -2,28 +2,29 @@
|
|||||||
|
|
||||||
namespace mineplex\plugin;
|
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\Listener;
|
||||||
use pocketmine\event\player\PlayerJoinEvent;
|
|
||||||
use pocketmine\event\player\PlayerCommandPreprocessEvent;
|
use pocketmine\event\player\PlayerCommandPreprocessEvent;
|
||||||
|
use pocketmine\event\player\PlayerJoinEvent;
|
||||||
|
use pocketmine\plugin\PluginBase;
|
||||||
|
use pocketmine\Server;
|
||||||
|
|
||||||
class Main extends PluginBase implements Listener
|
class Main extends PluginBase implements Listener
|
||||||
{
|
{
|
||||||
public function onEnable()
|
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()
|
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)
|
public function onPlayerJoin(PlayerJoinEvent $event)
|
||||||
{
|
{
|
||||||
$event->getPlayer()->sendMessage("Welcome to the server " . $event->getPlayer()->getName() . "!");
|
$event->getPlayer()->sendMessage("Welcome to the server " . $event->getPlayer()->getName() . "!");
|
||||||
|
Loading…
Reference in New Issue
Block a user