PocketMine-MP/example/ExamplePlugin.php
Shoghi Cervantes Pueyo 196b0a4263 Updated Interface
2012-12-26 14:02:37 +01:00

34 lines
537 B
PHP

<?php
/*
__PocketMine Plugin__
name=ExamplePlugin
version=0.0.1
author=shoghicp
class=ExamplePlugin
*/
class ExamplePlugin implements Plugin{
private $api;
public function __construct(ServerAPI $api, $server = false){
$this->api = $api;
}
public function init(){
$this->api->console->register("example", "Example command", array($this, "handleCommand"));
}
public function __destruct(){
}
public function handleCommand($cmd, $arg){
switch($cmd){
case "example":
console("EXAMPLE!!!");
break;
}
}
}