Wizards of Lua

The Art of Spell Crafting


The Wizards of Lua Configuration File

The Wizards of Lua Mod can be configured by editing its configuration file.

The Wizards of Lua configuration file is located at

<minecraft>/conf/wizards-of-lua/wizards-of-lua.luacfg

where <minecraft> is your Minecraft folder.

Please note that you should only edit it manually when Minecraft is not running. Otherwise your changes will be ignored and might get overwritten when the mod’s configuration has been changed by some /wol command.

Example

Here is an example of the wizards-of-lua.luacfg:

General {
  luaTicksLimit=50000,
  eventListenerLuaTicksLimit=50000,
  showAboutMessage=true,
  luaLibDirHome="libs",
  sharedLibDir="shared",
  gitHubAccessToken="5fb14281daac1ff4f16fd3e2adafbf91db3b9123" }
RestApi {
  hostname="example.com",
  port=60080,
  secure=true,
  keystore="ssl-keystore.jks",
  keystorePassword="123456",
  keyPassword="123456",
  webDir="www",
  uuid="fd19a362-04fa-4a92-9481-cd21a85c44d8",
  apiKey="sVu4QB1joXfQCM_DUAcFpw" }
ScriptGateway {
  enabled=true,
  timeoutMillis=2000,
  dir="scripts" }
Wizard {
  id="0c77f1a8-943b-4f7b-aa09-f2b1737d4f03",
  libDir="0c77f1a8-943b-4f7b-aa09-f2b1737d4f03",
  apiKey="8lpZ81w7AGWfKCRLHSZtvA" }
Wizard {
  id="d26feccb-baae-4d90-8e3d-50389e8b8ad9",
  libDir="d26feccb-baae-4d90-8e3d-50389e8b8ad9",
  apiKey="9cssfWocUNoWVhA7-m50Cw" }

Format

The contents of wizards-of-lua.luacfg is valid Lua code which is loaded and executed by Wol at server startup. “General”, “RestApi”, and “Wizard” are internal functions that accept a Lua table as parameter. All values (with the exception of the wizard id) are optional - in that sense that you can omit the assignment, but on the next startup Wol will choose sensible default values and store them into this file.

General

This function sets the mod’s general configuration.

RestApi

This function sets the mod’s REST server configuration. The REST server is running inside your Minecraft server and provides HTTP (or HTTPS) access to your Lua files. All read and write access is protected by a combination of the server’s and the player’s secret apiKey. However, if you run Wol in a publicly accessible server environment, this is not sufficient in terms of security, since the key tokens are transmitted in plain text between web browser and REST server. To protect your keys in a server environment, you should set the secure property to “true”.

ScriptGateway

This function sets the mod’s script gateway configuration.

Wizard

This function adds a player-specific configuration. New entries are added automatically when a new player uses the /lua command or the /wol command the first time.