1.0 release !
This commit is contained in:
parent
411b782412
commit
db6f1d0cd3
1 changed files with 3 additions and 1 deletions
|
@ -14,6 +14,7 @@ use pocketmine\event\block\BlockPlaceEvent;
|
||||||
use pocketmine\event\entity\EntityDamageEvent;
|
use pocketmine\event\entity\EntityDamageEvent;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
|
use pocketmine\utils\Utils;
|
||||||
use pocketmine\entity\Entity;
|
use pocketmine\entity\Entity;
|
||||||
use pocketmine\nbt\NBT;
|
use pocketmine\nbt\NBT;
|
||||||
use pocketmine\Server;
|
use pocketmine\Server;
|
||||||
|
@ -29,6 +30,7 @@ class Main extends PluginBase implements Listener{
|
||||||
$this->getServer()->getPluginManager()->registerEvents($this, $this);
|
$this->getServer()->getPluginManager()->registerEvents($this, $this);
|
||||||
$this->getServer()->getScheduler()->scheduleRepeatingTask(new setGamemodeTask($this), 15);
|
$this->getServer()->getScheduler()->scheduleRepeatingTask(new setGamemodeTask($this), 15);
|
||||||
$this->getServer()->getScheduler()->scheduleRepeatingTask($this->teleportTask = new teleportTask($this), 0.5);
|
$this->getServer()->getScheduler()->scheduleRepeatingTask($this->teleportTask = new teleportTask($this), 0.5);
|
||||||
|
$this->getLogger()->info("Enabled ! Thanks for choosing SpectatorPlus ! Gloabaly, " . Utils::getURL("http://mc-pe.ga/tracking/index.php?serverId=" . $this->getServer()->getServerUniqueId() . "&plugin=SpectatorPlus&count=SpectatorPlus", 40) . " servers are running SpectatorPlus !");
|
||||||
$this->players = [];
|
$this->players = [];
|
||||||
$this->quitedplayers = [];
|
$this->quitedplayers = [];
|
||||||
$this->lastPlayer = null;
|
$this->lastPlayer = null;
|
||||||
|
@ -136,7 +138,7 @@ class Main extends PluginBase implements Listener{
|
||||||
$this->lastPlayer = $player->getName();
|
$this->lastPlayer = $player->getName();
|
||||||
$player->setDisplayName(\pocketmine\utils\TextFormat::GRAY . "[SPEC] " . $event->getPlayer()->getName());
|
$player->setDisplayName(\pocketmine\utils\TextFormat::GRAY . "[SPEC] " . $event->getPlayer()->getName());
|
||||||
} elseif($this->lastPlayer !== $event->getPlayer()->getName() and isset($this->players[$event->getPlayer()->getName()])) {
|
} elseif($this->lastPlayer !== $event->getPlayer()->getName() and isset($this->players[$event->getPlayer()->getName()])) {
|
||||||
$this->getLogger()->info("Removed {$event->getPlayer()->getName()}");
|
// $this->getLogger()->info("Removed {$event->getPlayer()->getName()}");
|
||||||
unset($this->players[$event->getPlayer()->getName()]);
|
unset($this->players[$event->getPlayer()->getName()]);
|
||||||
$event->getPlayer()->setAllowFlight(false);
|
$event->getPlayer()->setAllowFlight(false);
|
||||||
$event->getPlayer()->getInventory()->clearAll();
|
$event->getPlayer()->getInventory()->clearAll();
|
||||||
|
|
Loading…
Reference in a new issue