Added Spectate stuff!
Signed-off-by: Aaron Brock <TheMineBench@gmail.com>
This commit is contained in:
parent
ac20f55391
commit
844aa44dc4
@ -7,6 +7,7 @@ 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 pocketmine\event\Listener;
|
use pocketmine\event\Listener;
|
||||||
|
use pocketmine\event\player\PlayerDeathEvent;
|
||||||
use pocketmine\event\player\PlayerJoinEvent;
|
use pocketmine\event\player\PlayerJoinEvent;
|
||||||
use pocketmine\event\player\PlayerLoginEvent;
|
use pocketmine\event\player\PlayerLoginEvent;
|
||||||
use pocketmine\level\Position;
|
use pocketmine\level\Position;
|
||||||
@ -40,6 +41,11 @@ class Main extends PluginBase implements Listener
|
|||||||
$event->setCancelled();
|
$event->setCancelled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function onDeath(PlayerDeathEvent $event)
|
||||||
|
{
|
||||||
|
$event->getEntity()->setHealth($event->getEntity()->getMaxHealth());
|
||||||
|
}
|
||||||
|
|
||||||
public function onJoin(PlayerJoinEvent $event)
|
public function onJoin(PlayerJoinEvent $event)
|
||||||
{
|
{
|
||||||
$this->arena->addPlayer($event->getPlayer());
|
$this->arena->addPlayer($event->getPlayer());
|
||||||
|
@ -18,8 +18,13 @@ use mineplex\plugin\gameengine\game\components\world\WorldComponent;
|
|||||||
use mineplex\plugin\gameengine\time\BenchSchedule;
|
use mineplex\plugin\gameengine\time\BenchSchedule;
|
||||||
use mineplex\plugin\gameengine\time\BenchTask;
|
use mineplex\plugin\gameengine\time\BenchTask;
|
||||||
use mineplex\plugin\gameengine\time\BenchTaskData;
|
use mineplex\plugin\gameengine\time\BenchTaskData;
|
||||||
|
use pocketmine\entity\Effect;
|
||||||
use pocketmine\event\HandlerList;
|
use pocketmine\event\HandlerList;
|
||||||
use pocketmine\event\Listener;
|
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\Player;
|
||||||
use pocketmine\Server;
|
use pocketmine\Server;
|
||||||
use mineplex\plugin\gameengine\game\components\gamestate\events\GameStateChangeEvent;
|
use mineplex\plugin\gameengine\game\components\gamestate\events\GameStateChangeEvent;
|
||||||
@ -127,7 +132,9 @@ class LobbyCountdown implements Listener, BenchTask {
|
|||||||
BenchSchedule::cancelTask($this);
|
BenchSchedule::cancelTask($this);
|
||||||
|
|
||||||
$this->count = $this->startCount;
|
$this->count = $this->startCount;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -185,6 +192,6 @@ class LobbyCountdown implements Listener, BenchTask {
|
|||||||
|
|
||||||
private function popup(Player $player)
|
private function popup(Player $player)
|
||||||
{
|
{
|
||||||
$player->sendPopup($this->message);
|
$player->sendTip($this->message);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user