diff options
author | Lukas Pioch <lukas@zgow.de> | 2017-08-23 18:09:47 +0200 |
---|---|---|
committer | Lukas Pioch <lukas@zgow.de> | 2017-08-27 17:49:08 +0200 |
commit | a5bae9f2f37921bfcf6203282155a8779c818120 (patch) | |
tree | b51bcc42cdc65fd7d0d76fd312216ec0720c706a /Server/Plugins/APIDump/APIDesc.lua | |
parent | Added a new param to OnPlayerEditingBook and changed the names (diff) | |
download | cuberite-a5bae9f2f37921bfcf6203282155a8779c818120.tar cuberite-a5bae9f2f37921bfcf6203282155a8779c818120.tar.gz cuberite-a5bae9f2f37921bfcf6203282155a8779c818120.tar.bz2 cuberite-a5bae9f2f37921bfcf6203282155a8779c818120.tar.lz cuberite-a5bae9f2f37921bfcf6203282155a8779c818120.tar.xz cuberite-a5bae9f2f37921bfcf6203282155a8779c818120.tar.zst cuberite-a5bae9f2f37921bfcf6203282155a8779c818120.zip |
Diffstat (limited to 'Server/Plugins/APIDump/APIDesc.lua')
-rw-r--r-- | Server/Plugins/APIDump/APIDesc.lua | 125 |
1 files changed, 93 insertions, 32 deletions
diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index 73443aa41..5768e89f6 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -7022,10 +7022,37 @@ local Item5 = cItem(E_ITEM_DIAMOND_CHESTPLATE, 1, 0, "thorns=1;unbreaking=3"); cBookContent = { Desc = [[ -This class contains the information for a signed or writeable book: The author, title and the pages. A page of the writeable book is a simple string. For a signed book it can be a json string. For the json string use {{cCompositeChat}} to create a page and then the function {{cCompositeChat#CreateJsonString_1|CreateJsonString}} to get the json string. +This class contains the information for a signed or writeable book: The author, title and the pages. A page of the writeable book is a simple string. For a signed book it can be a json string. Use {{cCompositeChat}} to create a more complex page with formatting. ]], Functions = { + AddPage = + { + { + Params = + { + { + Name = "Page", + Type = "string", + }, + }, + Notes = "Add a page to the end of the book", + }, + { + Params = + { + { + Name = "Page", + Type = "cCompositeChat", + }, + }, + Notes = "Add a page to the end of the book. For signed book saves it as json string, otherwise as simple string", + } + }, + Clear = + { + Notes = "Clears the whole book", + }, constructor = { Returns = @@ -7036,18 +7063,17 @@ This class contains the information for a signed or writeable book: The author, }, Notes = "Creates a empty book", }, - SetAuthor = + GetAuthor = { - Params = + Returns = { { - Name = "Author", Type = "string", }, }, - Notes = "Set the author of the book", + Notes = "Returns the author of the book", }, - GetAuthor = + GetTitle = { Returns = { @@ -7055,74 +7081,109 @@ This class contains the information for a signed or writeable book: The author, Type = "string", }, }, - Notes = "Get the author of the book", + Notes = "Returns the title of the book", }, - SetTitle = + GetPage = { Params = { { - Name = "Title", + Type = "number", + }, + }, + Returns = + { + { Type = "string", }, }, - Notes = "Set the title of the book", + Notes = "Returns the page at the given index, can be a json string or a simple string. Note: one-based", }, - GetTitle = + GetPages = { Returns = { { - Type = "string", + Type = "table", }, }, - Notes = "Returns the title of the book", + Notes = "Returns the pages of the book as a table", }, - AddPage = + IsEmpty = + { + Returns = + { + { + Type = "boolean", + }, + }, + Notes = "Returns true if the book has no author, title and no pages", + }, + SetAuthor = { Params = { { - Name = "Page", + Name = "Author", Type = "string", }, }, - Notes = "Add a page to the end of the book. Note: If it's a written book, the page can be a json string", + Notes = "Set the author of the book", }, - GetPages = + SetPage = { - Returns = { + Params = { - Type = "table", + { + Name = "Index", + Type = "number", + }, + { + Name = "Page", + Type = "string", + }, }, + Notes = "Set's the page at the given index. Note: one-based", + }, + { + Params = + { + { + Name = "Index", + Type = "number", + }, + { + Name = "Page", + Type = "cCompositeChat", + }, + }, + Notes = "Set's the page at the given index. For signed book saves it as json string, otherwise as simple string. Note: one-based", }, - Notes = "Returns the pages of the book as a table", }, SetPages = { - Params = { + Params = { - Name = "Pages", - Type = "table", + { + Name = "Pages", + Type = "table", + }, }, + Notes = "Sets all pages of the book. A entry can be a string or a {{cCompositeChat}}", }, - Notes = "Set the pages of the book", }, - Clear = - { - Notes = "Clears the whole book", - }, - IsEmpty = + SetTitle = { - Returns = + Params = { { - Type = "boolean", + Name = "Title", + Type = "string", }, }, - Notes = "Returns true if the book has no author, title and no pages", + Notes = "Set the title of the book", }, }, }, |