You should update the API documentation - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html) +--- Thread: You should update the API documentation (/thread-1709.html) |
You should update the API documentation - Matouš - 01-07-2015 My plugin became broken and it took me quite a while to figure this out, because for some reason in some recent update you changed the behaviour of some funcions in the API - some of the hooks no longer send Cursor coordinates and BlockFace data (what was that anyways?), so the important data BlockType and BlockMeta now don't have index 9 and 10 in the argument list, but now they have 5 and 6, so the plugins using a callback function like this: Code: function OnPlayerPlacedBlock(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, CursorY, CursorZ, BlockType, BlockMeta) The main problem as I see it is a not up-to-date documentation of the API, multiplying the confusion caused by this (see this page http://mc-server.xoft.cz/LuaAPI/OnPlayerPlacedBlock.html ). Please do update the documentation and state the changes made clearly and somewhere visible. Thank you! If you have stated this and I just overlooked, I apologise, but still it would be a nice thing to have the documentation OK as it is the first place I think most people will look first. RE: You should update the API documentation - xoft - 01-07-2015 Ahoj Yes, the cursor coords and blockface is no longer sent to the OnPlayerPlacingBlock and OnPlayerPlacedBlock hooks. The change has been made about a month ago, and has been the result of this forum discussion: https://forum.cuberite.org/showthread.php?tid=1664 I didn't find your plugin online, so it's not listed in the list of plugins that I investigated. Sorry about that. Basically, the change allows us to call the hooks for blocks being placed indirectly - as part of larger structures, such as doors and beds. The Cursor coords and BlockFace are sent by the client when placing the block, they basically tell you which part of the block the player has rclked. RE: You should update the API documentation - xoft - 01-07-2015 API docs updated. They were updated in the repo, just not on the web. RE: You should update the API documentation - Matouš - 01-07-2015 Čau! How come you didn't find my plugin online? It was posted in this forum in (I hope) the right place and you responded to the post many times https://forum.cuberite.org/showthread.php?tid=1369&highlight=GPIO If there is any other place I am supposed to post my plugin, please let me know! Anyway there is a link to github ( https://github.com/matemat13/MCserver-RaspberryGPIO ) in the post. Where can I find the API docs in the repo? I was looking for it so that the next time I can look there directly, but I found only what seems to be a docs generator ( https://github.com/mc-server/MCServer/tree/master/docs ). Thanks for your prompt reply - I hope the development is going well I have played with the GPIO in MC the last afternoon after a long time and noticed some new stuff (like horses, droppers, some new blocks etc.) and also that the server spawns a LOT of creepers It is nice to see you implementing new stuff and keeping up with MC! RE: You should update the API documentation - NiLSPACE - 01-07-2015 You can find the API docs here: http://mc-server.xoft.cz/LuaAPI/ RE: You should update the API documentation - xoft - 01-07-2015 I was doing a google search for the specific hook name and for some reason it failed to include your plugin. And I've been keeping way too many things in my head so I didn't remember at the time. The API docs are generated by the APIDump plugin ( https://github.com/mc-server/MCServer/tree/master/MCServer/Plugins/APIDump ) - it reads the actual available API and maps it to the documentation that is provided in a form of Lua tables. Once you load the plugin, issue the "api" console command and the documentation will be generated in HTML form in the "API" subfolder next to the MCS executable. I have a script that does exactly this and then uploads the results to the web; I reinstalled my computer so I forgot to add that script to a regular scheduler. I might do it as a Jenkins job instead, so that the documentation is updated after each official build. RE: You should update the API documentation - Matouš - 01-07-2015 Cool, thanks! That is quite useful I don't think it is your responsibility to keep the plugins using certain updated hooks working - that should be the specific plugin creators responsibility to maintain it, but it would be nice to clearly state the changes in API which might break someones plugin, although that is a bonus as well... I was just surprised that you didn't find my plugin when you were looking for it, because I thought I did what I could to make it visible |