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; } } }