最初にPocketMine-MPをインストールしたフォルダーのpluginsの下に次のようにファイルを作る。
Example
├── plugin.yml
└── src── Example── Main.php
plugin.ymlは次のように書く。
Main.phpは次のように書く
これでPMMPを起動してください。[Server thread/INFO]: Loading source plugin Example v1.0.0
[Server thread/INFO]: [Example] onLoad() has been called!
[Server thread/INFO]: Enabling Example v1.0.0
[Server thread/INFO]: [Example] onEnable() has been called!
makeplugin Example
[Server thread/INFO]: [DevTools] Adding plugin.yml
[Server thread/INFO]: [DevTools] Adding src/Example/Main.php
[Server thread/INFO]: Phar plugin Example v1.0.0 has been created on /Pocketmine-MP/dev/plugins/DevTools//Example_v1.0.0.phar
これができたら、お疲れ様。次はEvent関係のPluginの作り方を説明します。