This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.
bz_getLoadedPlugins
Jump to navigation
Jump to search
int bz_getLoadedPlugins (bz_APIStringList* list)
Retrieves the names of all loaded plugins and counts how many of them there are.
Parameters:
list - The pointer to a bz_APIStringList list for storing/appending the plugin names to.
Returns:
The number of plugins that are currently loaded.
Example
Displays the list of plugins when a player joins the server, mimicking the output you would expect from the command /listplugins.
case bz_ePlayerJoinEvent: {
bz_APIStringList list;
int count=bz_getLoadedPlugins(&list);
for (int i=0;i<count;i++) {
bz_sendTextMessagef(BZ_SERVER,((bz_PlayerJoinPartEventData_V1*)eventData)->playerID,"%d %s",i+1,list.get(i).c_str());
}
}break;