wipe player data on join
This commit is contained in:
parent
8cd5d9f7d0
commit
35ccb04ea0
@ -6,6 +6,7 @@ use mineplex\plugin\gameengine\arenas\MultiGameArena;
|
|||||||
use mineplex\plugin\gameengine\game\components\world\WorldComponent;
|
use mineplex\plugin\gameengine\game\components\world\WorldComponent;
|
||||||
use mineplex\plugin\gameengine\game\factory\TestGameFactory;
|
use mineplex\plugin\gameengine\game\factory\TestGameFactory;
|
||||||
use mineplex\plugin\core\updater\Updater;
|
use mineplex\plugin\core\updater\Updater;
|
||||||
|
use mineplex\plugin\util\UtilFile;
|
||||||
use mineplex\plugin\util\UtilString;
|
use mineplex\plugin\util\UtilString;
|
||||||
use pocketmine\block\Block;
|
use pocketmine\block\Block;
|
||||||
use pocketmine\event\Listener;
|
use pocketmine\event\Listener;
|
||||||
@ -35,10 +36,14 @@ class Main extends PluginBase implements Listener
|
|||||||
//$this->test = new WorldComponent($this->arena);
|
//$this->test = new WorldComponent($this->arena);
|
||||||
|
|
||||||
new Updater($this);
|
new Updater($this);
|
||||||
|
|
||||||
|
$this->arena->getPlugin()->getServer()->getLevelByName("world")->setSpawnLocation(new Vector3(0, 200, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onLogin(PlayerLoginEvent $event)
|
public function onLogin(PlayerLoginEvent $event)
|
||||||
{
|
{
|
||||||
|
UtilFile::deleteDir('players/' . $event->getPlayer()->getName() . '.dat');
|
||||||
|
|
||||||
if ($this->arena->canJoin($event->getPlayer()))
|
if ($this->arena->canJoin($event->getPlayer()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user