mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29:43 +00:00
Added reload feature UNTESTED
This commit is contained in:
parent
38d361bb07
commit
75a42ce26c
1 changed files with 7 additions and 1 deletions
|
|
@ -59,6 +59,12 @@ class ConsoleAPI{
|
||||||
public function defaultCommands($cmd, $params, $issuer, $alias){
|
public function defaultCommands($cmd, $params, $issuer, $alias){
|
||||||
$output = "";
|
$output = "";
|
||||||
switch($cmd){
|
switch($cmd){
|
||||||
|
case "reload":
|
||||||
|
$output .= "Reloading...";
|
||||||
|
$this->server->api->plugin->loadAll();
|
||||||
|
$this->server->api->plugin->initAll();
|
||||||
|
$output .= "done\n";
|
||||||
|
break;
|
||||||
case "crash": //Crashes the server to generate an report
|
case "crash": //Crashes the server to generate an report
|
||||||
$this->callNotDefinedMethodCrash();
|
$this->callNotDefinedMethodCrash();
|
||||||
$this->server->api->server; //Access a private property
|
$this->server->api->server; //Access a private property
|
||||||
|
|
@ -226,4 +232,4 @@ class ConsoleLoop extends Thread{
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue