diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-08-16 18:02:16 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-08-16 18:02:16 +0200 |
commit | 9395cf0bca15371b8dfdb7a444c1e9f7cca0252c (patch) | |
tree | 4d5252d0d5fd44ff05f5429cd11853e7d9b4d75f /src/Bindings/PluginManager.cpp | |
parent | Merge pull request #1316 from ChriPiv/master (diff) | |
download | cuberite-9395cf0bca15371b8dfdb7a444c1e9f7cca0252c.tar cuberite-9395cf0bca15371b8dfdb7a444c1e9f7cca0252c.tar.gz cuberite-9395cf0bca15371b8dfdb7a444c1e9f7cca0252c.tar.bz2 cuberite-9395cf0bca15371b8dfdb7a444c1e9f7cca0252c.tar.lz cuberite-9395cf0bca15371b8dfdb7a444c1e9f7cca0252c.tar.xz cuberite-9395cf0bca15371b8dfdb7a444c1e9f7cca0252c.tar.zst cuberite-9395cf0bca15371b8dfdb7a444c1e9f7cca0252c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/PluginManager.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp index 89bfe3566..b9d28205d 100644 --- a/src/Bindings/PluginManager.cpp +++ b/src/Bindings/PluginManager.cpp @@ -1189,6 +1189,25 @@ bool cPluginManager::CallHookProjectileHitEntity(cProjectileEntity & a_Projectil +bool cPluginManager::CallHookServerPing(const AString & a_Username, AString & a_Motd, int & a_OnlinePlayersCount, int & a_MaxPlayersCount, AString & a_Favicon) +{ + FIND_HOOK(HOOK_SERVER_PING); + VERIFY_HOOK; + + for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr) + { + if ((*itr)->OnServerPing(a_Username, a_Motd, a_OnlinePlayersCount, a_MaxPlayersCount, a_Favicon)) + { + return true; + } + } + return false; +} + + + + + bool cPluginManager::CallHookSpawnedEntity(cWorld & a_World, cEntity & a_Entity) { FIND_HOOK(HOOK_SPAWNED_ENTITY); |