mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Implemented Plugin Interface
This commit is contained in:
@ -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":
|
||||
|
Reference in New Issue
Block a user