mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Implemented Plugin Interface
This commit is contained in:
parent
00fea6461c
commit
987a6e635e
4 changed files with 22 additions and 4 deletions
|
|
@ -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":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue