本文整理汇总了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]);
}
}
示例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()]);
}
}
示例3: QuitEvent
public function QuitEvent(PlayerQuitEvent $ev)
{
$player = $ev->getPlayer();
if ($player->isop()) {
$ev->setQuitMessage("GM [" . $player->getName() . "] 님께서 SAO 데이테베이솔부터 로그아웃 하셨습니다 ");
}
}
示例4: onQuit
public function onQuit(PlayerQuitEvent $event)
{
$player = $event->getPlayer();
if (isset($this->tictock[$player->getName()])) {
unset($this->tictock[$player->getName()]);
}
}
示例5: onQuit
public function onQuit(PlayerQuitEvent $event)
{
$player = $event->getPlayer();
if ($this->plugin->hasFlyingSession($player)) {
$this->plugin->removeFlyingSession($player);
}
}
示例6: onQuit
public function onQuit(PlayerQuitEvent $event)
{
$player = $event->getPlayer();
if ($this->plugin->isActive($player)) {
$this->plugin->removeActive($player);
}
}
示例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]);
}
}
示例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());
}
示例9: onQuit
public function onQuit(PlayerQuitEvent $ev)
{
$n = trim(strtolower($ev->getPlayer()->getName()));
if (isset($this->players[$n])) {
unset($this->players[$n]);
}
}
示例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)));
}
}
示例11: onPlayerQuit
public function onPlayerQuit(PlayerQuitEvent $event)
{
$player = $event->getPlayer();
if ($player instanceof Player) {
$this->plugin->petOwnerDeregister($event->getPlayer());
}
}
示例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);
}
示例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));
}
示例14: onQuit
public function onQuit(PlayerQuitEvent $ev)
{
$pl = $ev->getPlayer();
$n = $pl->getName();
if (isset($this->players[$n])) {
unset($this->players[$n]);
}
}
示例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()]);
}
}