Merge branch 'master' of https://github.com/mc-server/MCServer
This commit is contained in:
@@ -485,6 +485,17 @@ void cServer::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallbac
|
||||
{
|
||||
if (split.size() > 1)
|
||||
{
|
||||
cPluginManager::PluginMap map = cPluginManager::Get()->GetAllPlugins();
|
||||
|
||||
for (auto plugin_entry : map)
|
||||
{
|
||||
if (plugin_entry.first == split[1])
|
||||
{
|
||||
a_Output.Out("Error! Plugin is already loaded!");
|
||||
a_Output.Finished();
|
||||
return;
|
||||
}
|
||||
}
|
||||
a_Output.Out(cPluginManager::Get()->LoadPlugin(split[1]) ? "Plugin loaded" : "Error occurred loading plugin");
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user