Implemented Plugin Interface

This commit is contained in:
Shoghi Cervantes Pueyo
2012-12-26 13:33:43 +01:00
parent 00fea6461c
commit 987a6e635e
4 changed files with 22 additions and 4 deletions

View File

@ -9,7 +9,7 @@ class=ExamplePlugin
*/
class ExamplePlugin{
class ExamplePlugin implements Plugin{
private $api;
public function __construct($api, $server = false){
$this->api = $api;
@ -19,6 +19,10 @@ class ExamplePlugin{
$this->api->console->register("example", "Example command", array($this, "handleCommand"));
}
public function __destruct(){
}
public function handleCommand($cmd, $arg){
switch($cmd){
case "example":