当前位置: 首页>>代码示例>>PHP>>正文


PHP PlayerQuitEvent::getPlayer方法代码示例

本文整理汇总了PHP中pocketmine\event\player\PlayerQuitEvent::getPlayer方法的典型用法代码示例。如果您正苦于以下问题:PHP PlayerQuitEvent::getPlayer方法的具体用法?PHP PlayerQuitEvent::getPlayer怎么用?PHP PlayerQuitEvent::getPlayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pocketmine\event\player\PlayerQuitEvent的用法示例。


在下文中一共展示了PlayerQuitEvent::getPlayer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onPlayerQuit

 public function onPlayerQuit(PlayerQuitEvent $event)
 {
     $player = $event->getPlayer();
     if ($player instanceof Player) {
         $this->plugin->petOwnerDeregister($event->getPlayer());
     }
 }
开发者ID:flaxues,项目名称:BuddyPets,代码行数:7,代码来源:EventListener.php

示例2: onPlayerQuit

 /** 
  * @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());
 }
开发者ID:NameNoOne100,项目名称:PocketMine-Plugins,代码行数:11,代码来源:SkinToolsListener.php

示例3: playerQuit

 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;
 }
开发者ID:TDMGamingMC,项目名称:HungerSimulator,代码行数:9,代码来源:EventPlayer.php

示例4: onQuit

 /**
  *
  * @param PlayerQuitEvent $event        	
  */
 public function onQuit(PlayerQuitEvent $event)
 {
     $this->plugin->log("GameLevelListener: " . $event->getEventName() . " player: " . $event->getPlayer()->getName());
     //should only notify team $quitMessage
     //$event->setQuitMessage("[HG]".$event->getPlayer()->getName()." left the game");
     if ($event->getPlayer() instanceof Player) {
         $player = $event->getPlayer();
         $this->plugin->gameLevelManager->handlePlayerLeaveTheGame($player);
     }
 }
开发者ID:robozeri,项目名称:SG,代码行数:14,代码来源:GameLevelListener.php

示例5: onQuitEvent

 public function onQuitEvent(PlayerQuitEvent $event)
 {
     $config = $this->getConfig();
     foreach ($this->getServer()->getOnlinePlayers() as $players) {
         $playerName = $event->getPlayer()->getName();
         $msg2 = $config->get("Announce-Quit");
         $msg2 = str_replace("{PLAYER}", $playerName, $msg2);
         $p = $event->getPlayer();
         $players->sendTip($msg2);
     }
 }
开发者ID:XxD7omGamer,项目名称:EasyTips,代码行数:11,代码来源:Main.php

示例6: onQuit

 public function onQuit(PlayerQuitEvent $event)
 {
     foreach ($this->tntRun->arenas as $arena) {
         if ($arena->getPlayerManager()->isInArena($event->getPlayer())) {
             if ($arena->getPlayerManager()->isPlaying($event->getPlayer())) {
                 $arena->getPlayerHandler()->leavePlayer($event->getPlayer());
             } else {
                 $arena->getPlayerHandler()->leaveSpectator($event->getPlayer());
             }
             return;
         }
     }
 }
开发者ID:EmreTr1,项目名称:TNTRun,代码行数:13,代码来源:EventListener.php

示例7: onPlayerQuit

 /**
  * Handle player quit events.  Restore player's inventory before resetting
  * state.
  *
  * @param PlayerQuitEvent $ev - Quit event
  */
 public function onPlayerQuit(PlayerQuitEvent $ev)
 {
     echo __METHOD__ . "," . __LINE__ . "\n";
     //##DEBUG
     $n = MPMU::iName($ev->getPlayer());
     $xx = $this->getState(self::tag, $ev->getPlayer(), null);
     if ($xx !== null) {
         $this->restoreInv($ev->getPlayer());
     }
     parent::onPlayerQuit($ev);
     echo __METHOD__ . "," . __LINE__ . "\n";
     //##DEBUG
 }
开发者ID:DWWf,项目名称:pocketmine-plugins,代码行数:19,代码来源:ShoppingCart.php

示例8: onQuit

 public function onQuit(PlayerQuitEvent $event)
 {
     // 숙주가 나가는 것을 캐치후 새 숙주를 선정
     if (isset($this->infectionData["hostzombie"])) {
         if ($this->infectionData["hostzombie"] == strtolower($event->getPlayer()->getName())) {
             $this->infectedHostSelect();
         }
     }
     // TODO 좀비또는 생존자일경우 기록을 제거
     if (isset($this->skin["users"][strtolower($event->getPlayer()->getName())])) {
         $event->getPlayer()->setSkin($this->skin["users"][strtolower($event->getPlayer()->getName())]);
         unset($this->skin["users"][strtolower($event->getPlayer()->getName())]);
     }
 }
开发者ID:nesgohood,项目名称:PMMP-Plugins,代码行数:14,代码来源:ZombieInfection.php

示例9: onQuit

 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)));
     }
 }
开发者ID:Pocket-GAD,项目名称:PocketMine-MP-Plugins,代码行数:7,代码来源:Main.php

示例10: onPlayerQuitEvent

 public function onPlayerQuitEvent(PlayerQuitEvent $e)
 {
     $pl = MPMU::iName($e->getPlayer());
     if (isset($this->state[$pl])) {
         unset($this->state[$pl]);
     }
 }
开发者ID:Gabriel865,项目名称:pocketmine-plugins,代码行数:7,代码来源:TradingMgr.php

示例11: onQuit

 /**
  *
  * @param PlayerQuitEvent $event        	
  */
 public function onQuit(PlayerQuitEvent $event)
 {
     if ($event->getPlayer() instanceof Player) {
         $player = $event->getPlayer();
         unset($this->plugin->getStatueManager()->npcsSpawns[$event->getPlayer()->getName()]);
     }
 }
开发者ID:robozeri,项目名称:SG,代码行数:11,代码来源:StatueListener.php

示例12: onQuit

 public function onQuit(PlayerQuitEvent $ev)
 {
     $n = trim(strtolower($ev->getPlayer()->getName()));
     if (isset($this->players[$n])) {
         unset($this->players[$n]);
     }
 }
开发者ID:applqpak,项目名称:plugin-remakes,代码行数:7,代码来源:Main.php

示例13: QuitEvent

 public function QuitEvent(PlayerQuitEvent $ev)
 {
     $player = $ev->getPlayer();
     if ($player->isop()) {
         $ev->setQuitMessage("GM [" . $player->getName() . "] 님께서 SAO 데이테베이솔부터 로그아웃 하셨습니다 ");
     }
 }
开发者ID:junknight,项目名称:SAOjoin,代码行数:7,代码来源:SAOjoin.php

示例14: onQuit

 public function onQuit(PlayerQuitEvent $event)
 {
     $player = $event->getPlayer();
     if (isset($this->tictock[$player->getName()])) {
         unset($this->tictock[$player->getName()]);
     }
 }
开发者ID:EmreTr1,项目名称:rtr,代码行数:7,代码来源:TICTOCK.php

示例15: onQuit

 public function onQuit(PlayerQuitEvent $event)
 {
     $player = $event->getPlayer();
     if ($this->plugin->hasFlyingSession($player)) {
         $this->plugin->removeFlyingSession($player);
     }
 }
开发者ID:Pocket-GAD,项目名称:PocketMine-MP-Plugins,代码行数:7,代码来源:EventListener.php


注:本文中的pocketmine\event\player\PlayerQuitEvent::getPlayer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。