
inject
A library for making injecting into Netty easier!
1,8 тыс.3обновлён 17 июн. 2026 г.
БиблиотекиТехнологии
Описание
inject
Inject is a simple server-side library to allow developers to inject into Netty easier.
Example
This uses the HttpInjector class to respond to HTTP requests to the Minecraft
server.
class MyEpicHttpInjector extends HttpInjector {
@Override
public HttpByteBuf intercept(ChannelHandlerContext ctx, HttpRequest request) {
HttpByteBuf buf = HttpByteBuf.httpBuf(ctx);
buf.writeStatusLine("1.1", 200, "OK");
buf.writeText("Hello, from Minecraft!");
return buf;
}
}
Registration
For Fabric, use the InjectFabric class:
public class MyMod implements ModInitializer {
@Override
public void onInitialize() {
InjectFabric.INSTANCE.registerInjector(new MyEpicHttpInjector());
}
}
For Spigot, Paper and derivatives, use the InjectSpigot class:
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {
InjectSpigot.INSTANCE.registerInjector(new MyEpicHttpInjector());
}
}
This will register an HTTP injector which will respond with Hello, from Minecraft!
to any HTTP request to the Minecraft port.
$ curl http://localhost:25565
Hello, from Minecraft!
Supported web servers
- Spring Boot:
springmodule - Javalin:
javalinmodule - Ktor:
ktormodule - Jetty:
jettymodule - manual request handling:
httpmodule
Examples can be found in the examples module.
Usage
Add the Brawls repo to gradle:
repositories {
maven("https://maven.mcbrawls.net/releases/")
}
Add the dependency:
dependencies {
implementation("net.mcbrawls.inject:api:VERSION")
// For HTTP-related things:
implementation("net.mcbrawls.inject:http:VERSION")
// Fabric:
include(modImplementation("net.mcbrawls.inject:fabric:VERSION")!!)
// Spigot/Paper:
implementation("net.mcbrawls.inject:spigot:VERSION")
// You can find the other modules for Spring, Ktor, etc. on the Github repo.
}
Replace VERSION with the latest version from the releases tab.
Последние версии
Все версии →release
Inject 3.2.0
3.2.017 июн. 2026 г.130Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2folia, paper, purpur, spigot
release
Inject 3.2.0
3.2.017 июн. 2026 г.126Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2fabric
release
Inject 3.1.4
3.1.417 мая 2025 г.171Minecraft: 1.21.1, 1.21.2, 1.21.3, 1.21.4folia, paper, purpur, spigot
release
Inject 3.1.4
3.1.417 мая 2025 г.135Minecraft: 1.21.1, 1.21.2, 1.21.3, 1.21.4fabric
release
Inject 3.1.3
3.1.317 мар. 2025 г.104Minecraft: 1.21.1, 1.21.2, 1.21.3, 1.21.4fabric
Что нового
fix(#3): handle OpaqueByteBufHolder correctly
release
Inject 3.1.1
3.1.120 дек. 2024 г.130Minecraft: 1.21.1, 1.21.2, 1.21.3, 1.21.4fabric
Что нового
- feat: velocity support
release
Inject 3.0.0
3.0.012 дек. 2024 г.120Minecraft: 1.21.1, 1.21.2, 1.21.3, 1.21.4spigot
Что нового
- Spring Boot support
- Ktor support
- Javalin support
- Jetty support
- Merge spigot and paper module into one
release
Inject 3.0.0
3.0.012 дек. 2024 г.170Minecraft: 1.21.1, 1.21.2, 1.21.3, 1.21.4fabric
Что нового
- Spring Boot support
- Ktor support
- Javalin support
- Jetty support
- Merge spigot and paper module into one
release
Inject 2.2.2
2.2.211 нояб. 2024 г.129Minecraft: 1.21.1, 1.21.2, 1.21.3paper
Что нового
Fixes #2
release
Inject 2.2.2
2.2.211 нояб. 2024 г.110Minecraft: 1.21.1, 1.21.2, 1.21.3spigot
Что нового
Fixes #2