03-22-2017, 06:34 PM
I suggest you read the API docs, especially the examples there - it explains what hooks are and how to register them, and includes a full example plugin:
https://api.cuberite.org/
https://api.cuberite.org/Writing-a-Cuberite-plugin.html
https://api.cuberite.org/
https://api.cuberite.org/Writing-a-Cuberite-plugin.html