From 0a68994f4800b063bf7a7e32663220ec4063402f Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Mon, 23 Mar 2020 12:18:12 +0000 Subject: Manual merge of #4498. Credit to @MeMuXin Closes #4498 --- Server/Plugins/APIDump/Classes/Plugins.lua | 4 ++++ Server/Plugins/APIDump/Hooks/OnPlayerMoving.lua | 1 + 2 files changed, 5 insertions(+) (limited to 'Server/Plugins/APIDump') diff --git a/Server/Plugins/APIDump/Classes/Plugins.lua b/Server/Plugins/APIDump/Classes/Plugins.lua index 9945a2478..bb9848667 100644 --- a/Server/Plugins/APIDump/Classes/Plugins.lua +++ b/Server/Plugins/APIDump/Classes/Plugins.lua @@ -818,6 +818,10 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage); { Notes = "Called after a player has broken a block.", }, + HOOK_PLAYER_CROUCHED = + { + Notes = "Called when a player crouches.", + }, HOOK_PLAYER_DESTROYED = { Notes = "Called when the {{cPlayer}} object is destroyed - a player has disconnected.", diff --git a/Server/Plugins/APIDump/Hooks/OnPlayerMoving.lua b/Server/Plugins/APIDump/Hooks/OnPlayerMoving.lua index 4385bf94d..6b3df6bf4 100644 --- a/Server/Plugins/APIDump/Hooks/OnPlayerMoving.lua +++ b/Server/Plugins/APIDump/Hooks/OnPlayerMoving.lua @@ -13,6 +13,7 @@ return { Name = "Player", Type = "{{cPlayer}}", Notes = "The player who has moved. The object already has the new position stored in it." }, { Name = "OldPosition", Type = "{{Vector3d}}", Notes = "The old position." }, { Name = "NewPosition", Type = "{{Vector3d}}", Notes = "The new position." }, + { Name = "PreviousIsOnGround", Type = "{{boolean}}", Notes = "Specifies if the player was standing on a solid block." }, }, Returns = [[ If the function returns true, movement is prohibited.

-- cgit v1.2.3