Cuberite Forum
CheckBlockInteractionsRate export hook - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: CheckBlockInteractionsRate export hook (/thread-1323.html)



CheckBlockInteractionsRate export hook - ThuGie - 01-21-2014

Hey guys,

I noticed that the server has CheckBlockInteractionsRate() when you do a interaction,
Could when it does trigger a hook be made, for anti-cheat plugins etc ?
So lets say a admin wants to get a warning when somebody does trigger it,
They get a msg, or they want to warn the player etc, or even allow somebody to actually do it, simply don't return;

Would be quite nice to have it, not sure if the server has more stuff like this,
Like distance check for interaction, so a plugin can report, or even overwrite it,
So a custom item is able to interact with it over a larger distance.

Stuff like that, thanks in advance.


RE: CheckBlockInteractionsRate export hook - xoft - 01-21-2014

Sounds reasonable, make an issue in the GitHub issue tracker for it (only the CheckBlockInteractionsRate()); try to be as specific as possible - if such hook existed, what parameters would it receive, what would the return values be, what would server do with individual return values, etc. Think of it as the documentation, like the one we have for the current hooks at http://mc-server.xoft.cz/LuaAPI/#hooks


RE: CheckBlockInteractionsRate export hook - ThuGie - 01-21-2014

I will do, i will do this tomorrow though in mids of playing madpack :p a minecraft mod pack.


RE: CheckBlockInteractionsRate export hook - xoft - 01-21-2014

Please try not to modify cPluginManager / cPlugin / cLuaState too much now, I'm in the middle of making some rather big changes and I would really hate to have to resolve conflicts on merge.