summaryrefslogtreecommitdiffstats
path: root/src/Server.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-20 20:01:53 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-20 20:01:53 +0200
commit2334c8dd9d6a295e3c445e548b5902c9f49ab532 (patch)
tree914eb4019ea6ca8e1f3c92198b910c05f3a6ecbc /src/Server.cpp
parentMigrated cSleep and cTimer to std::chrono (diff)
parentMerge pull request #1554 from SphinxC0re/master (diff)
downloadcuberite-2334c8dd9d6a295e3c445e548b5902c9f49ab532.tar
cuberite-2334c8dd9d6a295e3c445e548b5902c9f49ab532.tar.gz
cuberite-2334c8dd9d6a295e3c445e548b5902c9f49ab532.tar.bz2
cuberite-2334c8dd9d6a295e3c445e548b5902c9f49ab532.tar.lz
cuberite-2334c8dd9d6a295e3c445e548b5902c9f49ab532.tar.xz
cuberite-2334c8dd9d6a295e3c445e548b5902c9f49ab532.tar.zst
cuberite-2334c8dd9d6a295e3c445e548b5902c9f49ab532.zip
Diffstat (limited to '')
-rw-r--r--src/Server.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Server.cpp b/src/Server.cpp
index f29683b21..38e5cebb3 100644
--- a/src/Server.cpp
+++ b/src/Server.cpp
@@ -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