Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
Loading...
Searching...
No Matches
lua Namespace Reference

Lua utility namespace. More...

Functions

int luaCustomPrint (lua_State *state)
 Custom print.
 
void registerDefaultLibs (lua_State *state, const char *name)
 Loads default libs.
 

Detailed Description

Lua utility namespace.

Function Documentation

◆ luaCustomPrint()

int lua::luaCustomPrint ( lua_State * state)

Custom print.

Wrapper around logger::plugin so that lua doesn't directly print to console

Parameters
statethe lua state
Returns
int lua thing whether it succeeded

◆ registerDefaultLibs()

void lua::registerDefaultLibs ( lua_State * state,
const char * name )

Loads default libs.

Opens all default libs and creates a custom print luaCustomPrint(lua_State*) with the name pointer that should be pointing to the plugin name.

Parameters
statelua state to load libs to
namethe pointer to the name of the plugin