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


PHP player\PlayerQuitEvent类代码示例

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


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

示例1: 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

示例2: 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

示例3: QuitEvent

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

示例4: 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

示例5: 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

示例6: onQuit

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

示例7: onPlayerQuit

 /**
  * 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]);
     }
 }
开发者ID:PocketMine-PHP7,项目名称:ManyWorlds-PHP7,代码行数:13,代码来源:Session.php

示例8: 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

示例9: 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

示例10: 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

示例11: onPlayerQuit

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

示例12: onQuit

 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);
 }
开发者ID:NameNoOne100,项目名称:CustomMessages,代码行数:8,代码来源:Main.php

示例13: onQuit

 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));
 }
开发者ID:applqpak,项目名称:JoinLeaveMessages,代码行数:8,代码来源:Main.php

示例14: onQuit

 public function onQuit(PlayerQuitEvent $ev)
 {
     $pl = $ev->getPlayer();
     $n = $pl->getName();
     if (isset($this->players[$n])) {
         unset($this->players[$n]);
     }
 }
开发者ID:HeechFive,项目名称:pocketmine-plugins,代码行数:8,代码来源:FireBlade.php

示例15: onQuit

 public function onQuit(PlayerQuitEvent $event)
 {
     $p = $event->getPlayer();
     if (isset($this->playerSubs[$p->getId()])) {
         $this->playerSubs[$p->getId()]->release();
         unset($this->playerSubs[$p->getId()]);
     }
 }
开发者ID:barnseyminesuk,项目名称:Small-ZC-Plugins,代码行数:8,代码来源:SessionControl.php


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