PocketMine-MP/example/ExamplePlugin.php
Shoghi Cervantes Pueyo 1b47a716d3 Updated plugins
2012-12-26 03:01:21 +01:00

31 lines
480 B
PHP

<?php
/*
__PocketMine Plugin__
name=ExamplePlugin
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;
}
}
}