AuthMeReloaded icon indicating copy to clipboard operation
AuthMeReloaded copied to clipboard

Configuration API

Open ImagineWave opened this issue 1 year ago • 5 comments

What feature do you want to see added?

Override configuration settings through API

for example I need to override login/register message interval

Are there any alternatives?

Right now it's possible only though reflection dark magic

Anything else?

No response

ImagineWave avatar Aug 28 '24 20:08 ImagineWave

You could use reflections to obtain the AuthMe.injector instance and then invoke injector.getSingleton(SettingsManager) to interact with our settings manager.

sgdc3 avatar Aug 29 '24 23:08 sgdc3

How to set Property<Integer> MESSAGE_INTERVAL? I should use ur ch.jalu.configme.properties.Property ?

ImagineWave avatar Aug 31 '24 21:08 ImagineWave

The properties’ values can be changed in config.yml

ljacqu avatar Sep 01 '24 06:09 ljacqu

The properties’ values can be changed in config.yml

BRUH are u suggesting as a solution that I corrupt user configs? I'm trying to do integration plugin

ImagineWave avatar Sep 01 '24 12:09 ImagineWave

I don't think you should override settings that a user can change in a config file. But what sgdc3 said would indeed work.

ljacqu avatar Sep 01 '24 16:09 ljacqu