summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp
diff options
context:
space:
mode:
authorSTRWarrior <STRWarrior@users.noreply.github.com>2014-08-20 22:57:48 +0200
committerSTRWarrior <STRWarrior@users.noreply.github.com>2014-08-20 22:57:48 +0200
commit3a113e3a75bb345d008e13bbecae5f78ed9d9aae (patch)
treed2d17b4c0091905cb55245305292ada6dcb11d71 /src/Bindings/PluginManager.cpp
parentMerge pull request #1335 from mc-server/CodeFixes (diff)
parentRenamed a_Motd to a_ServerDescription. (diff)
downloadcuberite-3a113e3a75bb345d008e13bbecae5f78ed9d9aae.tar
cuberite-3a113e3a75bb345d008e13bbecae5f78ed9d9aae.tar.gz
cuberite-3a113e3a75bb345d008e13bbecae5f78ed9d9aae.tar.bz2
cuberite-3a113e3a75bb345d008e13bbecae5f78ed9d9aae.tar.lz
cuberite-3a113e3a75bb345d008e13bbecae5f78ed9d9aae.tar.xz
cuberite-3a113e3a75bb345d008e13bbecae5f78ed9d9aae.tar.zst
cuberite-3a113e3a75bb345d008e13bbecae5f78ed9d9aae.zip
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-rw-r--r--src/Bindings/PluginManager.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp
index dbc359f0e..f62e6ae02 100644
--- a/src/Bindings/PluginManager.cpp
+++ b/src/Bindings/PluginManager.cpp
@@ -1189,6 +1189,25 @@ bool cPluginManager::CallHookProjectileHitEntity(cProjectileEntity & a_Projectil
+bool cPluginManager::CallHookServerPing(cClientHandle & a_ClientHandle, AString & a_ServerDescription, 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_ClientHandle, a_ServerDescription, a_OnlinePlayersCount, a_MaxPlayersCount, a_Favicon))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
bool cPluginManager::CallHookSpawnedEntity(cWorld & a_World, cEntity & a_Entity)
{
FIND_HOOK(HOOK_SPAWNED_ENTITY);