diff options
author | Mattes D <github@xoft.cz> | 2016-03-02 10:05:10 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2016-03-17 19:29:01 +0100 |
commit | 62d81eb763e6fb72af5d828c1892156e1f5a3127 (patch) | |
tree | 7c04181f9f1f21dbe6a5ef00d5fed53c1baa8a54 /src/Bindings/PluginManager.cpp | |
parent | Added cLuaState::cCallback for representing (resettable) Lua callbacks. (diff) | |
download | cuberite-62d81eb763e6fb72af5d828c1892156e1f5a3127.tar cuberite-62d81eb763e6fb72af5d828c1892156e1f5a3127.tar.gz cuberite-62d81eb763e6fb72af5d828c1892156e1f5a3127.tar.bz2 cuberite-62d81eb763e6fb72af5d828c1892156e1f5a3127.tar.lz cuberite-62d81eb763e6fb72af5d828c1892156e1f5a3127.tar.xz cuberite-62d81eb763e6fb72af5d828c1892156e1f5a3127.tar.zst cuberite-62d81eb763e6fb72af5d828c1892156e1f5a3127.zip |
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-rw-r--r-- | src/Bindings/PluginManager.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp index 5b3ef7803..203450505 100644 --- a/src/Bindings/PluginManager.cpp +++ b/src/Bindings/PluginManager.cpp @@ -1965,6 +1965,23 @@ bool cPluginManager::ForEachPlugin(cPluginCallback & a_Callback) +AString cPluginManager::GetPluginFolderName(const AString & a_PluginName) +{ + // TODO: Implement locking for plugins + for (auto & plugin: m_Plugins) + { + if (plugin->GetName() == a_PluginName) + { + return plugin->GetFolderName(); + } + } + return AString(); +} + + + + + void cPluginManager::AddHook(cPlugin * a_Plugin, int a_Hook) { if (a_Plugin == nullptr) |