properties - GregHib/void GitHub Wiki
Properties are Game Settings used to configure and customise a world by a server operator in the game.properties file.
Use properties for:
- Server-wide behaviour (xp rates, movement rules)
- Startup-configuration (network & storage settings)
- Paths and external file locations
- Feature toggles
Not everything should be a property however.
Avoid properties for:
- Per Item/Npc/Object values - These should be stored in config files
You can access properties in scripts using the Settings[...] operator:
val x = Settings["world.home.x", 0]The second argument is the default value if the property is missing or invalid.
You can access booleans, numbers, and strings the same way:
val membersOnly = Settings["world.members", false]
val xpRate = Settings["world.experienceRate", 1.0]
val serverName = Settings["server.name", "Server"]worldSpawn {
if (Settings["events.shootingStars.enabled", false]) {
eventUpdate()
}
}- Properties are global and apply to the whole server.
- Reload properties with the
reload settingscommand. -
settingsReload {}event handler to listen for reloads.