mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Remove /reload (#2823)
For many years, this has been the cause of many users (particularly plugin devs) confusion. The reality is that /reload has little to no practical value. It does not reload plugin source code (contrary to popular belief).
This commit is contained in:
@ -1570,43 +1570,6 @@ class Server{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function reload() : void{
|
||||
$this->logger->info("Saving worlds...");
|
||||
|
||||
foreach($this->levelManager->getLevels() as $level){
|
||||
$level->save();
|
||||
}
|
||||
|
||||
$this->pluginManager->disablePlugins();
|
||||
$this->pluginManager->clearPlugins();
|
||||
PermissionManager::getInstance()->clearPermissions();
|
||||
$this->commandMap->clearCommands();
|
||||
|
||||
$this->logger->info("Reloading properties...");
|
||||
$this->properties->reload();
|
||||
$this->maxPlayers = $this->getConfigInt("max-players", 20);
|
||||
|
||||
if($this->getConfigBool("hardcore", false) and $this->getDifficulty() < Level::DIFFICULTY_HARD){
|
||||
$this->setConfigInt("difficulty", Level::DIFFICULTY_HARD);
|
||||
}
|
||||
|
||||
$this->banByIP->load();
|
||||
$this->banByName->load();
|
||||
$this->reloadWhitelist();
|
||||
$this->operators->reload();
|
||||
|
||||
foreach($this->getIPBans()->getEntries() as $entry){
|
||||
$this->getNetwork()->blockAddress($entry->getName(), -1);
|
||||
}
|
||||
|
||||
$this->pluginManager->registerInterface(new PharPluginLoader($this->autoloader));
|
||||
$this->pluginManager->registerInterface(new ScriptPluginLoader());
|
||||
$this->pluginManager->loadPlugins($this->pluginPath);
|
||||
$this->enablePlugins(PluginLoadOrder::STARTUP);
|
||||
$this->enablePlugins(PluginLoadOrder::POSTWORLD);
|
||||
TimingsHandler::reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* Shuts the server down correctly
|
||||
*/
|
||||
|
Reference in New Issue
Block a user