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

Add configuration interface to expose certain config values #12273

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

NonSwag
Copy link
Contributor

@NonSwag NonSwag commented Mar 11, 2025

Previously, people (I) have been using the spigot and paper file configurations to determine whether the server is configured for proxy online mode
Now the spigot interface got deprecated for good reasons, but there is no alternative

image

This commit introduces methods to check the online mode and enablement status of Velocity and BungeeCord. These changes allow plugins to easily query proxy-related server configurations.

I would like to have some input on the method names since Bukkit uses getOnlineMode
Also, I wasn't really sure on whether to return bungee/velocity online mode true only if the server is actually using bungee or velocity

This commit introduces methods to check the online mode and enablement status of Velocity and BungeeCord. These changes allow plugins to easily query proxy-related server configurations.
@NonSwag NonSwag requested a review from a team as a code owner March 11, 2025 18:22
@Machine-Maker
Copy link
Member

I wouldn't be immediately opposed to a new interface where select values from the configuration can be exposed more directly. I wouldn't want even more methods on Bukkit/Server for this though. I think there are probably these and several more values which we can consider stable enough to expose in the API.

@NonSwag
Copy link
Contributor Author

NonSwag commented Mar 12, 2025

I wouldn't be immediately opposed to a new interface where select values from the configuration can be exposed more directly. I wouldn't want even more methods on Bukkit/Server for this though. I think there are probably these and several more values which we can consider stable enough to expose in the API.

I like that idea, let me cook something up

moved all previously added methods to the new server config interface
@NonSwag
Copy link
Contributor Author

NonSwag commented Mar 12, 2025

I've added a new interface ServerConfiguration

@NonSwag NonSwag requested a review from kennytv March 12, 2025 19:38
@NonSwag NonSwag changed the title Add proxy mode and proxy type checks to the API Add configuration interface to expose certain config values Mar 12, 2025
@Warriorrrr Warriorrrr added type: feature Request for a new Feature. scope: api labels Mar 17, 2025
@NonSwag NonSwag requested review from mbax, Warriorrrr and kennytv March 24, 2025 15:37
@NonSwag NonSwag requested a review from Warriorrrr March 31, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: api type: feature Request for a new Feature.
Projects
Status: Awaiting final testing
Development

Successfully merging this pull request may close these issues.

5 participants