summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2020-03-23 13:18:12 +0100
committerAlexander Harkness <me@bearbin.net>2020-03-23 13:18:12 +0100
commit0a68994f4800b063bf7a7e32663220ec4063402f (patch)
treec8875e6cff55a388f325571c96487f42747581f5 /src/Bindings/PluginManager.cpp
parentDon't attempt to give bucket with item count of 0 (diff)
downloadcuberite-0a68994f4800b063bf7a7e32663220ec4063402f.tar
cuberite-0a68994f4800b063bf7a7e32663220ec4063402f.tar.gz
cuberite-0a68994f4800b063bf7a7e32663220ec4063402f.tar.bz2
cuberite-0a68994f4800b063bf7a7e32663220ec4063402f.tar.lz
cuberite-0a68994f4800b063bf7a7e32663220ec4063402f.tar.xz
cuberite-0a68994f4800b063bf7a7e32663220ec4063402f.tar.zst
cuberite-0a68994f4800b063bf7a7e32663220ec4063402f.zip
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-rw-r--r--src/Bindings/PluginManager.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp
index 987b6a7cf..13039f834 100644
--- a/src/Bindings/PluginManager.cpp
+++ b/src/Bindings/PluginManager.cpp
@@ -794,11 +794,11 @@ bool cPluginManager::CallHookPlayerLeftClick(cPlayer & a_Player, int a_BlockX, i
-bool cPluginManager::CallHookPlayerMoving(cPlayer & a_Player, const Vector3d & a_OldPosition, const Vector3d & a_NewPosition)
+bool cPluginManager::CallHookPlayerMoving(cPlayer & a_Player, const Vector3d & a_OldPosition, const Vector3d & a_NewPosition, bool a_PreviousIsOnGround)
{
return GenericCallHook(HOOK_PLAYER_MOVING, [&](cPlugin * a_Plugin)
{
- return a_Plugin->OnPlayerMoving(a_Player, a_OldPosition, a_NewPosition);
+ return a_Plugin->OnPlayerMoving(a_Player, a_OldPosition, a_NewPosition, a_PreviousIsOnGround);
}
);
}
@@ -846,6 +846,19 @@ bool cPluginManager::CallHookPlayerPlacingBlock(cPlayer & a_Player, const sSetBl
+bool cPluginManager::CallHookPlayerCrouched(cPlayer & a_Player)
+{
+ return GenericCallHook(HOOK_PLAYER_CROUCHED, [&](cPlugin * a_Plugin)
+ {
+ return a_Plugin->OnPlayerCrouched(a_Player);
+ }
+ );
+}
+
+
+
+
+
bool cPluginManager::CallHookPlayerRightClick(cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ)
{
return GenericCallHook(HOOK_PLAYER_RIGHT_CLICK, [&](cPlugin * a_Plugin)