Skip to content

Accessing the Config

CleverNucleus edited this page Jun 22, 2021 · 1 revision

Accessing the Config

The API includes access through an interface to the PlayerEx config, in case your addon mod needs to know what settings are being used. The Config includes client and server side config options - they behave as follows:

  • On the client, the client options are how the user has them currently configured; on the server they are how the server has them configured (server-side options require the server to restart for changes to take place).
  • On the server, the client options are their defaults; on the server they are how the server has them configured at start. Accessing the server-side options from either the client or server should be identical. The config can be accessed by:
void genericMethod() {
    // The config
    IConfig config = ExAPI.CONFIG.get();
}