Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
jungwuk-ryu committed Nov 22, 2019
1 parent 9b1afea commit ea9f87f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions example/plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: example
author: example
main: example\example
api:
- 3.1.4
version: 1.2.0
27 changes: 27 additions & 0 deletions example/src/example/example.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace example;

/**
* 테스트 되지 않음
* 플레이어 서버 퇴장시 밴드에 글로 알림
**/

use pocketmine\utils\Config;
use pocketmine\plugin\PluginBase;
use pocketmine\event\Listener;
use pocketmine\command\CommandSender;
use pocketmine\command\Command;
use pocketmine\event\player\PlayerQuitEvent;

class example extends PluginBase implements Listener
{
public function onEnable()
{
$this->getServer()->getPluginManager()->registerEvents($this, $this);
}
public function onQuit(PlayerQuitEvent $ev)
{
$this->getServer()->getPluginManager()->getPlugin("bandAPI_hc")->writePost($ev->getPlayer()->getName() . "님이 서버에서 퇴장하셨습니다.", "여기에 band_key의 값을 입력하세요.", false);
}
}

0 comments on commit ea9f87f

Please sign in to comment.