
Что это
A library for making injecting into Netty easier!
- Тип: мод
- Загрузчик: fabric, folia, paper, purpur, spigot
- Версии Minecraft: 1.21 – 26.2
- Скачиваний на Modrinth: 1 823
Подробно
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.
java 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: java public class MyMod implements ModInitializer { @Override public void onInitialize() { InjectFabric.INSTANCE.registerInjector(new MyEpicHttpInjector()); } }
For Spigot, Paper and derivatives, use the InjectSpigot class: java 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.
bash $ 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: kt repositories { maven("https://maven.mcbrawls.net/releases/") }
Add the dependency: kt 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.
Как установить
Скачайте файл на официальной странице ниже и положите его в папку mods (для модов) или plugins (для плагинов) вашего сервера или клиента. Для модов нужен совместимый загрузчик. Версия должна совпадать с версией Minecraft.
Текст подготовлен автоматически из описания на Modrinth и ждёт проверки редакцией.
Комментарии 0
Комментарии к этому материалу отключены.
Читайте также
Help Me Hardcore
Help Me Hardcore Adds All Kinds of Extra Challenges from Community Ideas to Full-Themed Updates for Your Hardcore Worlds or Even Hardcore… 05.12.2026
Better Sophisticated Upgrades
Vanillafies the Upgrade-textures from sophisticated mods 05.12.2026
Better Mob Heads
Better Mob Heads gives supported vanilla mobs without an existing vanilla head item a decorative custom head when they die. 05.12.2026
JDK's Mining Utilities 2
This mod adds mining stuff to your game, such as hammers, drills and more 05.12.2026
Grief Prevention Home
An GriefPrevention addon where you can easily teleport too your and others plots 05.12.2026
CommandGUI
Customizable Command GUI for Spigot/Paper 05.12.2026