Fixing signs, starting a fix on spec errors, should work now :D

This commit is contained in:
Ad5001 2016-08-05 15:31:34 +03:00
parent 1ead9c7570
commit 859c286585
5 changed files with 60 additions and 30 deletions

View file

@ -11,6 +11,10 @@ class Example extends Game {
public function onGameStop() {
$this->getLogger()->info("Game stoped");
foreach($this->getLevel()->getPlayers() as $p) {
$p->setGamemode(0);
$p->teleport($this->getServer()->getDefaultLevel()->getSafeSpawn());
}
}
@ -26,6 +30,13 @@ class Example extends Game {
}
public function onPlayerDeath(\pocketmine\event\PlayerDeathEvent $event) {
if(($this->getPlugin()->getInGamePlayers($this->getLevel()) - 1) == 0) {
$this->stop();
}
}
public function getName() : string {
return "Example";