Settings

From Minetest Developer Wiki
Jump to: navigation, search


The minetest.Settings object is an interface to read config files in the format of minetest.conf, which replaces the deprecated minetest.setting_* functions.

Methods

  • get(key): returns a value
  • get_bool(key, [default]): returns a boolean
  • get_np_group(key): returns a NoiseParams table
  • set(key, value)
  • set_bool(key, value)
  • set_np_group(key, value)
  • remove(key): returns a boolean (true for success)
  • get_names(): returns {key1,...}
  • write(): returns a boolean (true for success)
  • to_table(): returns {[key1]=value1,...}

Example

local delay = minetest.settings:get("mymod.delay") or 10
minetest.after(delay, foobar)
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox