[{"data":1,"prerenderedAt":392},["ShallowReactive",2],{"docs-\u002Fplatforms\u002Fbungee":3},{"id":4,"title":5,"body":6,"description":382,"extension":383,"meta":384,"navTitle":385,"navigation":386,"path":387,"rawbody":388,"seo":389,"stem":390,"__hash__":391},"docs\u002Fplatforms\u002Fbungee.md","BungeeCord",{"type":7,"value":8,"toc":372},"minimark",[9,13,28,33,81,84,88,98,102,110,146,150,153,182,186,192,352,356],[10,11,5],"h1",{"id":12},"bungeecord",[14,15,16,20,21,27],"p",{},[17,18,19],"code",{},"magicutils-bungee"," exposes platform wiring, config, logger, lang, command, and\ndiagnostics integration for ",[22,23,5],"a",{"href":24,"rel":25},"https:\u002F\u002Fgithub.com\u002FSpigotMC\u002FBungeeCord",[26],"nofollow","\nproxies in one artifact.",[29,30,32],"h2",{"id":31},"shared-bundle-install","Shared Bundle Install",[14,34,35,36,39,40,44,45,48,49,52,53,56,57,60,61,64,65,68,69,72,73,76,77,80],{},"If several plugins on the proxy use MagicUtils, install\n",[17,37,38],{},"magicutils-bungee-bundle"," as a ",[41,42,43],"strong",{},"standalone proxy plugin"," instead of shading\nMagicUtils into each one. It is a drop-in ",[17,46,47],{},"MagicUtils"," plugin that boots one\nshared ",[17,50,51],{},"MagicRuntime"," and registers ",[17,54,55],{},"\u002Fmagicutils"," (alias ",[17,58,59],{},"mu",") with diagnostics\nsub-commands. Downstream plugins then depend on it (",[17,62,63],{},"depends","\u002F",[17,66,67],{},"softDepends"," in\ntheir ",[17,70,71],{},"bungee.yml",") and register with the shared runtime through\n",[17,74,75],{},"BungeeMagicUtilsConsumerRegistry",", so ",[17,78,79],{},"\u002Fmagicutils mods"," lists them live. The\npublished bundle jar is a shaded runnable artifact — the same one exercised by\nthe compatibility smoke.",[14,82,83],{},"Do not do both: either embed MagicUtils in your plugin, or depend on the shared\nbundle — not both on the same proxy.",[29,85,87],{"id":86},"dependency","Dependency",[89,90,96],"pre",{"className":91,"code":93,"language":94,"meta":95},[92],"language-kotlin","dependencies {\n    implementation(\"dev.ua.theroer:magicutils-bungee:1.27.1\")\n}\n","kotlin","",[17,97,93],{"__ignoreMap":95},[29,99,101],{"id":100},"recommended-bootstrap","Recommended Bootstrap",[89,103,108],{"className":104,"code":106,"language":107,"meta":95},[105],"language-java","public final class MyPlugin extends Plugin {\n    private BungeeBootstrap.RuntimeResult magic;\n\n    @Override\n    public void onEnable() {\n        magic = BungeeBootstrap.forPlugin(this, \"MyPlugin\")\n                .enableCommands()\n                .configureCommands(registry -> registry.registerCommand(new ExampleCommand()))\n                .buildRuntime();\n    }\n\n    @Override\n    public void onDisable() {\n        if (magic != null) {\n            magic.runtime().close();\n            magic = null;\n        }\n    }\n}\n","java",[17,109,106],{"__ignoreMap":95},[14,111,112,115,116,119,120,119,123,126,127,130,131,134,135,138,139,142,143,145],{},[17,113,114],{},"BungeeBootstrap"," creates the ",[17,117,118],{},"Platform",", ",[17,121,122],{},"ConfigManager",[17,124,125],{},"LoggerCore",",\n",[17,128,129],{},"LanguageManager",", and optional ",[17,132,133],{},"CommandRegistry"," for the plugin. ",[17,136,137],{},"build()","\nreturns the legacy bootstrap view; ",[17,140,141],{},"buildRuntime()"," additionally gives you a\nmanaged ",[17,144,51],{},".",[29,147,149],{"id":148},"commands","Commands",[14,151,152],{},"Commands register directly with the proxy plugin manager, so you do not declare\nthem anywhere else.",[154,155,156,164,170,176],"ul",{},[157,158,159,160,163],"li",{},"Use ",[17,161,162],{},"enableCommands()"," to create the registry during bootstrap.",[157,165,159,166,169],{},[17,167,168],{},"configureCommands(...)"," to register commands right away.",[157,171,159,172,175],{},[17,173,174],{},"permissionPrefix(...)"," to set the permission node prefix.",[157,177,159,178,181],{},[17,179,180],{},"asyncExecutor(...)"," to override the default async executor used by the\ncommand layer.",[29,183,185],{"id":184},"bootstrap-options","Bootstrap Options",[14,187,188,191],{},[17,189,190],{},"BungeeBootstrap.Builder"," supports additional configuration beyond the basics:",[193,194,195,208],"table",{},[196,197,198],"thead",{},[199,200,201,205],"tr",{},[202,203,204],"th",{},"Method",[202,206,207],{},"Description",[209,210,211,226,236,248,258,268,278,288,298,308,322,332,342],"tbody",{},[199,212,213,219],{},[214,215,216],"td",{},[17,217,218],{},"logger(logger)",[214,220,221,222,225],{},"Bind a ",[17,223,224],{},"java.util.logging.Logger"," for console output.",[199,227,228,233],{},[214,229,230],{},[17,231,232],{},"dataDirectory(path)",[214,234,235],{},"Override the config\u002Flang data directory.",[199,237,238,242],{},[214,239,240],{},[17,241,162],{},[214,243,244,245,247],{},"Create a ",[17,246,133],{}," during bootstrap.",[199,249,250,255],{},[214,251,252],{},[17,253,254],{},"permissionPrefix(prefix)",[214,256,257],{},"Set the permission node prefix for commands.",[199,259,260,265],{},[214,261,262],{},[17,263,264],{},"asyncExecutor(executor)",[214,266,267],{},"Override the async executor used by the command layer.",[199,269,270,275],{},[214,271,272],{},[17,273,274],{},"configureCommands(consumer)",[214,276,277],{},"Register commands during bootstrap.",[199,279,280,285],{},[214,281,282],{},[17,283,284],{},"enableDiagnostics()",[214,286,287],{},"Enable the diagnostics service.",[199,289,290,295],{},[214,291,292],{},[17,293,294],{},"initLanguage(boolean)",[214,296,297],{},"Enable\u002Fdisable language manager initialization.",[199,299,300,305],{},[214,301,302],{},[17,303,304],{},"bindLoggerLanguage(boolean)",[214,306,307],{},"Bind the language manager to the logger.",[199,309,310,315],{},[214,311,312],{},[17,313,314],{},"setMessagesManager(boolean)",[214,316,317,318,321],{},"Set the global ",[17,319,320],{},"Messages"," language manager.",[199,323,324,329],{},[214,325,326],{},[17,327,328],{},"registerMessages(boolean)",[214,330,331],{},"Register the plugin's messages scope.",[199,333,334,339],{},[214,335,336],{},[17,337,338],{},"addMagicUtilsMessages(boolean)",[214,340,341],{},"Register built-in MagicUtils messages.",[199,343,344,349],{},[214,345,346],{},[17,347,348],{},"translations(consumer)",[214,350,351],{},"Configure additional translations.",[29,353,355],{"id":354},"notes","Notes",[154,357,358,364],{},[157,359,360,363],{},[17,361,362],{},"Platform.runOnMain(...)"," executes immediately because BungeeCord has no main\ngame thread.",[157,365,366,368,369,371],{},[17,367,141],{}," returns a managed ",[17,370,51],{}," and wires shutdown cleanup\nthrough the plugin instance you pass to the bootstrap.",{"title":95,"searchDepth":373,"depth":373,"links":374},3,[375,377,378,379,380,381],{"id":31,"depth":376,"text":32},2,{"id":86,"depth":376,"text":87},{"id":100,"depth":376,"text":101},{"id":148,"depth":376,"text":149},{"id":184,"depth":376,"text":185},{"id":354,"depth":376,"text":355},"Wire MagicUtils into a BungeeCord proxy plugin with BungeeBootstrap. Config, logger, lang, commands, and diagnostics in a single magicutils-bungee artifact.","md",{},null,true,"\u002Fplatforms\u002Fbungee","---\ntitle: BungeeCord\ndescription: Wire MagicUtils into a BungeeCord proxy plugin with BungeeBootstrap. Config, logger, lang, commands, and diagnostics in a single magicutils-bungee artifact.\n---\n\n# BungeeCord\n\n`magicutils-bungee` exposes platform wiring, config, logger, lang, command, and\ndiagnostics integration for [BungeeCord](https:\u002F\u002Fgithub.com\u002FSpigotMC\u002FBungeeCord)\nproxies in one artifact.\n\n## Shared Bundle Install\n\nIf several plugins on the proxy use MagicUtils, install\n`magicutils-bungee-bundle` as a **standalone proxy plugin** instead of shading\nMagicUtils into each one. It is a drop-in `MagicUtils` plugin that boots one\nshared `MagicRuntime` and registers `\u002Fmagicutils` (alias `mu`) with diagnostics\nsub-commands. Downstream plugins then depend on it (`depends`\u002F`softDepends` in\ntheir `bungee.yml`) and register with the shared runtime through\n`BungeeMagicUtilsConsumerRegistry`, so `\u002Fmagicutils mods` lists them live. The\npublished bundle jar is a shaded runnable artifact — the same one exercised by\nthe compatibility smoke.\n\nDo not do both: either embed MagicUtils in your plugin, or depend on the shared\nbundle — not both on the same proxy.\n\n## Dependency\n\n```kotlin\ndependencies {\n    implementation(\"dev.ua.theroer:magicutils-bungee:1.27.1\")\n}\n```\n\n## Recommended Bootstrap\n\n```java\npublic final class MyPlugin extends Plugin {\n    private BungeeBootstrap.RuntimeResult magic;\n\n    @Override\n    public void onEnable() {\n        magic = BungeeBootstrap.forPlugin(this, \"MyPlugin\")\n                .enableCommands()\n                .configureCommands(registry -> registry.registerCommand(new ExampleCommand()))\n                .buildRuntime();\n    }\n\n    @Override\n    public void onDisable() {\n        if (magic != null) {\n            magic.runtime().close();\n            magic = null;\n        }\n    }\n}\n```\n\n`BungeeBootstrap` creates the `Platform`, `ConfigManager`, `LoggerCore`,\n`LanguageManager`, and optional `CommandRegistry` for the plugin. `build()`\nreturns the legacy bootstrap view; `buildRuntime()` additionally gives you a\nmanaged `MagicRuntime`.\n\n## Commands\n\nCommands register directly with the proxy plugin manager, so you do not declare\nthem anywhere else.\n\n- Use `enableCommands()` to create the registry during bootstrap.\n- Use `configureCommands(...)` to register commands right away.\n- Use `permissionPrefix(...)` to set the permission node prefix.\n- Use `asyncExecutor(...)` to override the default async executor used by the\n  command layer.\n\n## Bootstrap Options\n\n`BungeeBootstrap.Builder` supports additional configuration beyond the basics:\n\n| Method | Description |\n| --- | --- |\n| `logger(logger)` | Bind a `java.util.logging.Logger` for console output. |\n| `dataDirectory(path)` | Override the config\u002Flang data directory. |\n| `enableCommands()` | Create a `CommandRegistry` during bootstrap. |\n| `permissionPrefix(prefix)` | Set the permission node prefix for commands. |\n| `asyncExecutor(executor)` | Override the async executor used by the command layer. |\n| `configureCommands(consumer)` | Register commands during bootstrap. |\n| `enableDiagnostics()` | Enable the diagnostics service. |\n| `initLanguage(boolean)` | Enable\u002Fdisable language manager initialization. |\n| `bindLoggerLanguage(boolean)` | Bind the language manager to the logger. |\n| `setMessagesManager(boolean)` | Set the global `Messages` language manager. |\n| `registerMessages(boolean)` | Register the plugin's messages scope. |\n| `addMagicUtilsMessages(boolean)` | Register built-in MagicUtils messages. |\n| `translations(consumer)` | Configure additional translations. |\n\n## Notes\n\n- `Platform.runOnMain(...)` executes immediately because BungeeCord has no main\n  game thread.\n- `buildRuntime()` returns a managed `MagicRuntime` and wires shutdown cleanup\n  through the plugin instance you pass to the bootstrap.\n",{"title":5,"description":382},"platforms\u002Fbungee","BLOXPXIfh83AM3LLfq4_eQZcVljQpCwYpdtBKoXAtEw",1783944485844]