Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration API #2871

Open
ImagineWave opened this issue Aug 28, 2024 · 5 comments
Open

Configuration API #2871

ImagineWave opened this issue Aug 28, 2024 · 5 comments

Comments

@ImagineWave
Copy link

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

@sgdc3
Copy link
Member

sgdc3 commented Aug 29, 2024

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

@ImagineWave
Copy link
Author

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

@ljacqu
Copy link
Member

ljacqu commented Sep 1, 2024

The properties’ values can be changed in config.yml

@ImagineWave
Copy link
Author

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

@ljacqu
Copy link
Member

ljacqu commented Sep 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants