get

@Contract(pure = true)
public abstract T get<T>(@Nonnull() IKeyWithDefault<T> key)

Use this function to retrieve a value from the config. Type-safe, will automatically decide what type to return based on your config class which defines all possible keys. MinecraftConfig Contains a good example of how to write getClassById config class.

Return

The value associated with this key

Parameters

key

Defined by your config class.

<T>

The (automatically inferred) type of the key to return

Throws

when the user has written an invalid config