I didn't pit this on pocket mine forums because this is not a plugin release.
Many server owners want to let some of their staff apply/upload their plugins remotely while they are sleeping or offline, but there is nobody to restart the server.
However, I have made a code to allow plugins be remotely disabled and loaded. How to use: (for plugin dev)
First, put your name at the second line below.
Second, on a website where you can upload raw text files, like GitHub or your own domain, upload a file with a content of five bytes "false". Then copy the URL (public accessible) to the first line.
Third, in your plugin, add the following into it at appropriate locations. (You know it if you are a plugin developer)
Fourth, add the code
if($this->loadMe===false)return;
in front of each function.
Fifth, send the plugin to the server owner.
Now everything should work normally.
If you have a new version of the plugin, on the public text file with content "false", replace the five bytes with the URL of your new version of the plugin. Then go online on the server. In one minute the server should detect that you are online and seld-disable after loading the new version.
private $weblink="Your plugin status URL here";
private $pluginDevName="Your name here";
public $loadMe=true;
public function init(){
if($this->loadMe===false)return;
#................
$this->api->schedule(1200,array($this,checkForUpdates));
}
public function checkForUpdates(){
$players=$this->api->player->getList();
$iAmOnline=false;
foreach($players as $player){
if($this->api->player->get($player)->username===$pluginDevName){$iAmOnline=true;break;}
}
if(!iAmOnLine){
$this->api->schedule(1200,array($this,checkForUpdates));
return; // only update when I am online
}
$updateInfo=file_get_contents($weblink);
if($updateInfo==="false"){
$this->api->schedule(1200,array($this,checkForUpdates));
return;
}
$this->api->plugin->load($updateInfo);
$this->loadMe=false;
$this->api->console->run("tell $pluginDevname updated plugin");
$this->api->schedule(1200,array($this,checkForUpdates));
}
I can be found on Freenode IRC channels #pocketmine, #ModPEScripts, #LegendOfMCPE, #pmplugins or #BeaconMine.
I am a PocketMine-MP plugin developer. I hate it when people think that I love stupid admin positions. Being an admin is nothing compared to being a plugin developer.
I am also a main developer of BlockServer, a work-in-progress MCPE server software. You are welcome to download it, but it so far onlly spawns you in the upther (above the world). You can chat, though.
I do not own this server but I just love to put this banner here:
Many server owners want to let some of their staff apply/upload their plugins remotely while they are sleeping or offline, but there is nobody to restart the server.
However, I have made a code to allow plugins be remotely disabled and loaded.
How to use: (for plugin dev)
First, put your name at the second line below.
Second, on a website where you can upload raw text files, like GitHub or your own domain, upload a file with a content of five bytes "false". Then copy the URL (public accessible) to the first line.
Third, in your plugin, add the following into it at appropriate locations. (You know it if you are a plugin developer)
Fourth, add the code in front of each function.
Fifth, send the plugin to the server owner.
Now everything should work normally.
If you have a new version of the plugin, on the public text file with content "false", replace the five bytes with the URL of your new version of the plugin. Then go online on the server. In one minute the server should detect that you are online and seld-disable after loading the new version.