Skip to content

inject

A library for making injecting into Netty easier!

FabricPaperPurpurSpigot
Loaders
FabricPaperPurpurSpigot
Downloads on Modrinth
1.8K
Followers on Modrinth
3
versions
14
Updated
June 17, 2026Jun 17
Published
in 2024
This is a library — other mods need it, and it adds nothing to the game by itself

At a glance

A library: other mods need it
Runs on Fabric, Paper, Purpur and Spigot
For Minecraft 1.21–26.2
Server only — players don't need to install it
Latest version — 3.2.0 from June 17, 2026
License MIT — free
Where it's needed
In gamenot neededOn serverrequired

Install on the server only; players don't need it

Game versions1.21–26.2

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: spring module
  • Javalin: javalin module
  • Ktor: ktor module
  • Jetty: jetty module
  • manual request handling: http module

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.

FAQ

How to install inject?

Install Fabric for your Minecraft version, download inject for the same version and loader, put the file into the mods folder and launch the game with the loader profile.

Which Minecraft versions does inject support?

inject has builds for Minecraft 1.21–26.2.

Is inject needed on the server?

Server only — players don't need to install it

License and source
MIT Licensefree to use and share with credit to the author
Original — Modrinth↗Files unchanged, verified with SHA-512Is this your mod? For rights holders

The site uses cookies: the necessary ones for sign-in and the theme, plus the Yandex Metrica and LiveInternet visit counters — they show us how the site is used. We have no advertising cookies. More