summaryrefslogtreecommitdiffstats
path: root/src/Server.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2014-10-20 15:34:19 +0200
committerAlexander Harkness <me@bearbin.net>2014-10-20 15:34:19 +0200
commitbf8de85fd64d193487f6bc3615747c9d1ea41ac6 (patch)
tree6fa9437a102961ff1e7884aef7f7f9dfd90d2a9f /src/Server.cpp
parentMerge pull request #1549 from SphinxC0re/master (diff)
parentAdded error message (diff)
downloadcuberite-bf8de85fd64d193487f6bc3615747c9d1ea41ac6.tar
cuberite-bf8de85fd64d193487f6bc3615747c9d1ea41ac6.tar.gz
cuberite-bf8de85fd64d193487f6bc3615747c9d1ea41ac6.tar.bz2
cuberite-bf8de85fd64d193487f6bc3615747c9d1ea41ac6.tar.lz
cuberite-bf8de85fd64d193487f6bc3615747c9d1ea41ac6.tar.xz
cuberite-bf8de85fd64d193487f6bc3615747c9d1ea41ac6.tar.zst
cuberite-bf8de85fd64d193487f6bc3615747c9d1ea41ac6.zip
Diffstat (limited to 'src/Server.cpp')
-rw-r--r--src/Server.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Server.cpp b/src/Server.cpp
index 8e5755a75..67315c8cf 100644
--- a/src/Server.cpp
+++ b/src/Server.cpp
@@ -491,6 +491,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