#inject

1 messages · Page 1 of 1 (latest)

narrow vector
#

I made this library a while ago that lets you make Netty injectors a lot more easily for Minecraft servers. This lets you do custom packet handling at a very low level and also allows you to accept HTTP traffic, which is currently the main focus of the library. inject supports different web servers: Spring Boot, Javalin, Ktor and manual request handling by raw data and Jetty. Note that all of this runs on the Minecraft port (:25565 by default).

My main use case for this is serving resource packs and other development UI without being required to open another port.

Please note that this may not work with all setups such as firewalls and proxies, such as TCPShield!

https://github.com/mcbrawls/inject

GitHub

A library for making injecting into Netty easier! Contribute to mcbrawls/inject development by creating an account on GitHub.

brave whale
#

how does netty/your plugin know if the connection should be handled by minecraft or the custom injector?
also do you have an example where the resourcepack is served over the same port as minecraft, but the mc server still works?

narrow vector
#

It depends on what the injector does. In the case of HTTP, it checks whether the packet contains the HTTP header, which Minecraft doesn't handle either way. As for your second question, any of the examples in the repo can serve a resource pack by just responding with a byte array and the server still works

#

I've made an entire admin UI with htmx and ktor with this