mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
31 lines
481 B
PHP
31 lines
481 B
PHP
<?php
|
|
|
|
/*
|
|
__PocketMine Plugin__
|
|
name=Example Plugin
|
|
version=0.0.1
|
|
author=shoghicp
|
|
class=ExamplePlugin
|
|
api=true
|
|
*/
|
|
|
|
|
|
class ExamplePlugin{
|
|
private $api;
|
|
public function __construct($api, $server = false){
|
|
$this->api = $api;
|
|
}
|
|
|
|
public function init(){
|
|
$this->api->console->register("example", "Example command", array($this, "handleCommand"));
|
|
}
|
|
|
|
public function handleCommand($cmd, $arg){
|
|
switch($cmd){
|
|
case "example":
|
|
console("EXAMPLE!!!");
|
|
break;
|
|
}
|
|
}
|
|
|
|
} |