diff --git a/Pocket/plugins/Mineplex/src/mineplex/plugin/Main.php b/Pocket/plugins/Mineplex/src/mineplex/plugin/Main.php index 7d52c10a9..6e533b0f2 100644 --- a/Pocket/plugins/Mineplex/src/mineplex/plugin/Main.php +++ b/Pocket/plugins/Mineplex/src/mineplex/plugin/Main.php @@ -7,6 +7,7 @@ use mineplex\plugin\gameengine\game\components\world\WorldComponent; use mineplex\plugin\gameengine\game\factory\TestGameFactory; use mineplex\plugin\core\updater\Updater; use pocketmine\event\Listener; +use pocketmine\event\player\PlayerDeathEvent; use pocketmine\event\player\PlayerJoinEvent; use pocketmine\event\player\PlayerLoginEvent; use pocketmine\level\Position; @@ -40,6 +41,11 @@ class Main extends PluginBase implements Listener $event->setCancelled(); } + public function onDeath(PlayerDeathEvent $event) + { + $event->getEntity()->setHealth($event->getEntity()->getMaxHealth()); + } + public function onJoin(PlayerJoinEvent $event) { $this->arena->addPlayer($event->getPlayer()); diff --git a/Pocket/plugins/Mineplex/src/mineplex/plugin/gameengine/game/components/countdown/LobbyCountdown.php b/Pocket/plugins/Mineplex/src/mineplex/plugin/gameengine/game/components/countdown/LobbyCountdown.php index bac78d405..ce1c286c3 100644 --- a/Pocket/plugins/Mineplex/src/mineplex/plugin/gameengine/game/components/countdown/LobbyCountdown.php +++ b/Pocket/plugins/Mineplex/src/mineplex/plugin/gameengine/game/components/countdown/LobbyCountdown.php @@ -18,8 +18,13 @@ use mineplex\plugin\gameengine\game\components\world\WorldComponent; use mineplex\plugin\gameengine\time\BenchSchedule; use mineplex\plugin\gameengine\time\BenchTask; use mineplex\plugin\gameengine\time\BenchTaskData; +use pocketmine\entity\Effect; use pocketmine\event\HandlerList; use pocketmine\event\Listener; +use pocketmine\event\player\PlayerDeathEvent; +use pocketmine\network\protocol\AnimatePacket; +use pocketmine\network\protocol\ContainerSetDataPacket; +use pocketmine\network\protocol\DropItemPacket; use pocketmine\Player; use pocketmine\Server; use mineplex\plugin\gameengine\game\components\gamestate\events\GameStateChangeEvent; @@ -127,7 +132,9 @@ class LobbyCountdown implements Listener, BenchTask { BenchSchedule::cancelTask($this); $this->count = $this->startCount; + } + } @@ -185,6 +192,6 @@ class LobbyCountdown implements Listener, BenchTask { private function popup(Player $player) { - $player->sendPopup($this->message); + $player->sendTip($this->message); } } \ No newline at end of file