summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.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/Entities/Player.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 '')
-rw-r--r--src/Entities/Player.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 637cc3710..f673813af 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -863,12 +863,17 @@ void cPlayer::SetFlyingMaxSpeed(double a_Speed)
void cPlayer::SetCrouch(bool a_IsCrouched)
{
// Set the crouch status, broadcast to all visible players
-
if (a_IsCrouched == m_IsCrouched)
{
// No change
return;
}
+
+ if (a_IsCrouched)
+ {
+ cRoot::Get()->GetPluginManager()->CallHookPlayerCrouched(*this);
+ }
+
m_IsCrouched = a_IsCrouched;
m_World->BroadcastEntityMetadata(*this);
}