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

Integrated Webserver for the Plugin #236

Open
pdinklag opened this issue Nov 27, 2023 · 2 comments
Open

Integrated Webserver for the Plugin #236

pdinklag opened this issue Nov 27, 2023 · 2 comments
Labels
Feedback Issues that need feedback from the reporter. New Feature Something that would be cool if added.

Comments

@pdinklag
Copy link
Owner

MinecraftStats currently relies on the fact that users have a webserver, either one that they maintain manually, or one provided by supported plugins (currently dynmap and BlueMap).

As far as I know, there is no actively maintained plugin that does nothing but host a webserver. If anybody knows of one, I would very much appreciate if you let me know so I could add support for it.

Otherwise, MinecraftStats could provide a webserver of its own. That would have to be a very stable one and easy to integrate, preferably a Java library with a short list of dependencies. The goal is to make things easier, but without bloating up the project so half of the code is for running a webserver. I would appreciate suggestions and/or contributions.

@pdinklag pdinklag added New Feature Something that would be cool if added. Feedback Issues that need feedback from the reporter. labels Nov 27, 2023
@Dad-Ju
Copy link

Dad-Ju commented Dec 5, 2023

One of the people at Bluemap found this, just to dump it here ;)
https://docs.oracle.com/en/java/javase/18/docs/api/jdk.httpserver/com/sun/net/httpserver/SimpleFileServer.html

@pdinklag
Copy link
Owner Author

pdinklag commented Dec 7, 2023

One of the people at Bluemap found this, just to dump it here ;) https://docs.oracle.com/en/java/javase/18/docs/api/jdk.httpserver/com/sun/net/httpserver/SimpleFileServer.html

Thanks! I was pretty sure this would be specific to Oracle Java due to the namespace, but OpenJDK seems to support it.
This hit me:

intended for testing, development and debugging purposes only

There's no real elaboration, and the JEP 408 only states a few notes in the non-goals. It's likely not the most performant of web servers and not recommendable for a large server that expects many requests, but this could also be added as a side note. It also doesn't support HTTPS, which may be an issue seeing how browsers are developing.

Still, this should be a viable addition if Java 18 or later is detected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback Issues that need feedback from the reporter. New Feature Something that would be cool if added.
Projects
None yet
Development

No branches or pull requests

2 participants