diff options
Diffstat (limited to 'Server/Plugins/APIDump/Hooks/OnPlayerEditingBook.lua')
-rw-r--r-- | Server/Plugins/APIDump/Hooks/OnPlayerEditingBook.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Server/Plugins/APIDump/Hooks/OnPlayerEditingBook.lua b/Server/Plugins/APIDump/Hooks/OnPlayerEditingBook.lua new file mode 100644 index 000000000..96521c361 --- /dev/null +++ b/Server/Plugins/APIDump/Hooks/OnPlayerEditingBook.lua @@ -0,0 +1,26 @@ +return +{ + HOOK_PLAYER_EDITING_BOOK = + { + CalledWhen = "A player is editing a book.", + DefaultFnName = "OnPlayerEditingBook", -- also used as pagename + Desc = [[ + This hook is called whenever a {{cPlayer|player}} is editing a book. + See also the {{OnPlayerEditingBook|HOOK_PLAYER_EDITED_BOOK}} hook for a similar hook, is called when a + player has edited a book. + ]], + Params = + { + { Name = "Player", Type = "{{cPlayer}}", Notes = "The player that is editing the book" }, + { Name = "BookContent", Type = "{{cBookContent}}", Notes = "The class that contains the current info of the book" }, + }, + Returns = [[ + If the function returns false or no value, Cuberite calls other plugins with this event. If the function returns true, + no other plugin's callback is called and the editing of the book is denied. + ]], + }, -- HOOK_PLAYER_EDITING_BOOK +} + + + + |