作者:Gabriel86
项目:pocketmine-plugin
public function onPlayerQuitEvent(PlayerQuitEvent $e)
{
$pl = MPMU::iName($e->getPlayer());
if (isset($this->state[$pl])) {
unset($this->state[$pl]);
}
}
作者:robozer
项目:S
/**
*
* @param PlayerQuitEvent $event
*/
public function onQuit(PlayerQuitEvent $event)
{
if ($event->getPlayer() instanceof Player) {
$player = $event->getPlayer();
unset($this->plugin->getStatueManager()->npcsSpawns[$event->getPlayer()->getName()]);
}
}
作者:junknigh
项目:SAOjoi
public function QuitEvent(PlayerQuitEvent $ev)
{
$player = $ev->getPlayer();
if ($player->isop()) {
$ev->setQuitMessage("GM [" . $player->getName() . "] 님께서 SAO 데이테베이솔부터 로그아웃 하셨습니다 ");
}
}
作者:EmreTr
项目:rt
public function onQuit(PlayerQuitEvent $event)
{
$player = $event->getPlayer();
if (isset($this->tictock[$player->getName()])) {
unset($this->tictock[$player->getName()]);
}
}
作者:Pocket-GA
项目:PocketMine-MP-Plugin
public function onQuit(PlayerQuitEvent $event)
{
$player = $event->getPlayer();
if ($this->plugin->hasFlyingSession($player)) {
$this->plugin->removeFlyingSession($player);
}
}
作者:HeroGaming
项目:PocketMine-MP-Plugin
public function onQuit(PlayerQuitEvent $event)
{
$player = $event->getPlayer();
if ($this->plugin->isActive($player)) {
$this->plugin->removeActive($player);
}
}
作者:PocketMine-PHP
项目:ManyWorlds-PHP
/**
* Handle player quit events. Free's data used by the state tracking
* code.
*
* @param PlayerQuitEvent $ev - Quit event
*/
public function onPlayerQuit(PlayerQuitEvent $ev)
{
$n = strtolower($ev->getPlayer()->getName());
if (isset($this->state[$n])) {
unset($this->state[$n]);
}
}
作者:NameNoOne10
项目:PocketMine-Plugin
/**
* @param PlayerQuitEvent $event
* @priority MONITOR
*/
public function onPlayerQuit(PlayerQuitEvent $event)
{
if ($this->plugin->isSkinStored($event->getPlayer())) {
$this->plugin->removeSkinData($event->getPlayer());
}
$this->plugin->clearTouchMode($event->getPlayer());
}
作者:applqpa
项目:plugin-remake
public function onQuit(PlayerQuitEvent $ev)
{
$n = trim(strtolower($ev->getPlayer()->getName()));
if (isset($this->players[$n])) {
unset($this->players[$n]);
}
}
作者:Pocket-GA
项目:PocketMine-MP-Plugin
public function onQuit(PlayerQuitEvent $event)
{
$this->clearjoin = $this->getConfig()->get("Clear on Quit");
if ($this->clearjoin == true) {
$event->getPlayer()->getInventory()->setContents(array(Item::get(0, 0, 0)));
}
}
作者:flaxue
项目:BuddyPet
public function onPlayerQuit(PlayerQuitEvent $event)
{
$player = $event->getPlayer();
if ($player instanceof Player) {
$this->plugin->petOwnerDeregister($event->getPlayer());
}
}
作者:NameNoOne10
项目:CustomMessage
public function onQuit(PlayerQuitEvent $event)
{
$player = $event->getPlayer();
$player_name = $player->getName();
$quit = "quit-message: ";
$quit_message = substr(strstr(file_get_contents("CustomMessages/messages.txt"), $quit), strlen($quit));
$event->setQuitMessage($quit_message);
}
作者:applqpa
项目:JoinLeaveMessage
public function onQuit(PlayerQuitEvent $event)
{
chdir($this->getDataFolder());
$data = file_get_contents("config.yml");
$file_array = json_decode($data, true);
$quit_message = $file_array["quit-message:"];
$event->setQuitMessage(str_replace("{player}", $event->getPlayer()->getDisplayName(), $quit_message));
}
作者:HeechFiv
项目:pocketmine-plugin
public function onQuit(PlayerQuitEvent $ev)
{
$pl = $ev->getPlayer();
$n = $pl->getName();
if (isset($this->players[$n])) {
unset($this->players[$n]);
}
}
作者:barnseyminesu
项目:Small-ZC-Plugin
public function onQuit(PlayerQuitEvent $event)
{
$p = $event->getPlayer();
if (isset($this->playerSubs[$p->getId()])) {
$this->playerSubs[$p->getId()]->release();
unset($this->playerSubs[$p->getId()]);
}
}
作者:organizatio
项目:AnnounceClea
public function onPlayerQuitEvent(PlayerQuitEvent $event)
{
$message = $event->getQuitMessage();
if ($message instanceof TranslationContainer) {
$message = $this->getServer()->getLanguage()->translateString($message->getText(), $message->getParameters());
}
AnnounceSystem::getInstance()->pushBroadCastPopup($message, 2);
$event->setQuitMessage(null);
}
作者:TDMGamingM
项目:HungerSimulato
public function playerQuit(PlayerQuitEvent $event)
{
$player = $event->getPlayer()->getDisplayName();
$var = $this->plr->get($player);
$var["foodExaustionLevel"] = $this->foodExhaustion[$player];
$this->plr->set($player, array_merge($var));
$this->plr->save();
$this->foodExhaustion[$event->getPlayer()->getDisplayName()] = false;
}
作者:AvivShope
项目:bad-plugin
public function onQuit(PlayerQuitEvent $e)
{
$n = self::iName($e->getPlayer());
if (isset($this->particles[$n])) {
list($p, $level, , ) = $this->particles[$n];
unset($this->particles[$n]);
$this->deSpawn($p, $level);
}
}
作者:AvivShope
项目:bad-plugin
public function onQuit(PlayerQuitEvent $ev)
{
$pl = $ev->getPlayer();
$n = strtolower($pl->getName());
if (isset($this->sessions[$n])) {
unset($this->sessions[$n]);
}
$this->stopSpying($pl);
}
作者:Vavaball
项目:BallzAut
/**
* If the player disconnect and
* he is registered, then update his
* last_disconnection value
* @param PlayerQuitEvent $event
*/
public function onPlayerDisconnect(PlayerQuitEvent $event)
{
$player = $event->getPlayer();
if (User::exist($player->getName())) {
$user = User::get($player->getName());
$now = date('Y-m-d H:i:s');
$user->last_disconnection = $now;
}
}