Difference between revisions of "Plugin API"
Jump to navigation
Jump to search
Example plugin structure: | Example plugin structure: | ||
| − | < | + | <pre><nowiki> |
| − | + | #include <stdio.h> | |
#include <stdlib.h> | #include <stdlib.h> | ||
#include <time.h> | #include <time.h> | ||
double pluginVersion = PLUGIN_VERSION; | double pluginVersion = PLUGIN_VERSION; | ||
| − | #define PLUGIN_NAME " | + | #define PLUGIN_NAME "pressurplate" |
const char* pluginName = PLUGIN_NAME; | const char* pluginName = PLUGIN_NAME; | ||
mineserver_pointer_struct* mineserver; | mineserver_pointer_struct* mineserver; | ||
| − | PLUGIN_API_EXPORT void CALLCONVERSION | + | PLUGIN_API_EXPORT void CALLCONVERSION pressurplate_init(mineserver_pointer_struct* mineserver_temp) |
{ | { | ||
mineserver = mineserver_temp; | mineserver = mineserver_temp; | ||
| − | PLUGIN_API_EXPORT void CALLCONVERSION | + | PLUGIN_API_EXPORT void CALLCONVERSION pressurplate_shutdown(void) |
{ | { | ||
if (mineserver->plugin.getPluginVersion(pluginName) <= 0) | if (mineserver->plugin.getPluginVersion(pluginName) <= 0) | ||
} | } | ||
| − | </ | + | </nowiki> |
| + | </pre> | ||
==Available functions== | ==Available functions== | ||
