Develop the BNGLan server system that allows players to convert any single-player Minecraft world into an online server with a permanent join link (e.g., bng.net/ABCD123). The plugin should support automatic protocol translation for versions from 1.8 to the latest Java Edition, ensuring players can join seamlessly without port forwarding. Key features include an intuitive INVENTORY GUI for world selection, server management (Start Online, Copy IP, Stop Server), auto-saving of the world and player data, a secure login system, and robust multiplayer synchronization, all implemented in clean, well-documented code.
Bootstrap a Fabric 1.21.11 server mod with commands, permissions, and persistent host state.
Add an inventory-based world-management GUI with start, copy-IP, and stop actions.
Add autosave hooks, secure session/login handling, and multiplayer-safe synchronization.
Add the relay/protocol-translation integration boundary, with clear configuration for the external BNGLan service.
Implemented the BNGLan Fabric 1.21.11 project from scratch.
Added Fabric Loom 1.14 project setup targeting Minecraft 1.21.11, Yarn mappings, Java 21, and Fabric API.
Added
/bngcommands:/bng token/bng login <token>/bng menu/bng status/bng stop
Added secure management-token authentication with hashed token storage and expiring sessions.
Added inventory world-management GUI with:
World selection
Start Online
Copy Join Link
Stop Server
Added persistent host state and JSON configuration.
Added autosaving every 30 seconds and relay heartbeats.
Added graceful relay shutdown during server stop.
Added HTTP relay integration boundary supporting:
Session creation
Session stop
Player heartbeat synchronization
Optional protocol translation from 1.8 through latest Java Edition
Added clickable permanent join-link messages using the configured
https://bng.net/base URL.
The compilation failed with this error:
Compilation failed with 16 error(s):
ERROR in src/main/java/net/bng/bnglan/command/BngLanCommands.java at line 28: cannot find symbol
.requires(source -> source.hasPermissionLevel(4))
^
symbol: method hasPermissionLevel(int)
location: variable source of type ServerCommandSource
ERROR in src/main/java/net/bng/bnglan/command/BngLanCommands.java at line 34: ClickEvent is abstract; cannot be instantiated
.withClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, token)));
^
ERROR in src/main/java/net/bng/bnglan/host/HostManager.java at line 74: cannot find symbol
List<WorldSelection> selections = availableWorlds(player.getServer());
^
symbol: method getServer()
location: variable player of type ServerPlayerEntity
ERROR in src/main/java/net/bng/bnglan/host/HostManager.java at line 189: HoverEvent is abstract; cannot be instantiated
.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Text.literal("Copy join link"))));
^
ERROR in src/main/java/net/bng/bnglan/host/HostManager.java at line 188: ClickEvent is abstract; cannot be instantiated
.withClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, link))
^
ERROR in src/main/java/net/bng/bnglan/auth/SessionManager.java at line 32: cannot find symbol
state.managementTokenHash = hash(token);
^
symbol: method hash(String)
location: class SessionManager
ERROR in src/main/java/net/bng/bnglan/auth/SessionManager.java at line 40: cannot find symbol
hash(token).getBytes(StandardCharsets.UTF_8))) {
^
symbol: method hash(String)
location: class SessionManager
ERROR in src/main/java/net/bng/bnglan/auth/SessionManager.java at line 48: cannot find symbol
if (player.hasPermissionLevel(4)) {
^
symbol: method hasPermissionLevel(int)
location: variable player of type ServerPlayerEntity
ERROR in src/main/java/net/bng/bnglan/command/BngLanCommands.java at line 34: ClickEvent is abstract; cannot be instantiated
.withClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, token)));
^
ERROR in src/main/java/net/bng/bnglan/host/HostManager.java at line 189: HoverEvent is abstract; cannot be instantiated
.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Text.literal("Copy join link"))));
^
ERROR in src/main/java/net/bng/bnglan/host/HostManager.java at line 188: ClickEvent is abstract; cannot be instantiated
.withClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, link))
^
ERROR in src/main/java/net/bng/bnglan/command/BngLanCommands.java at line 28: cannot find symbol
.requires(source -> source.hasPermissionLevel(4))
^
symbol: method hasPermissionLevel(int)
location: variable source of type ServerCommandSource
ERROR in src/main/java/net/bng/bnglan/host/HostManager.java at line 74: cannot find symbol
List<WorldSelection> selections = availableWorlds(player.getServer());
^
symbol: method getServer()
location: variable player of type ServerPlayerEntity
ERROR in src/main/java/net/bng/bnglan/auth/SessionManager.java at line 32: cannot find symbol
state.managementTokenHash = hash(token);
^
symbol: method hash(String)
location: class SessionManager
ERROR in src/main/java/net/bng/bnglan/auth/SessionManager.java at line 40: cannot find symbol
hash(token).getBytes(StandardCharsets.UTF_8))) {
^
symbol: method hash(String)
location: class SessionManager
ERROR in src/main/java/net/bng/bnglan/auth/SessionManager.java at line 48: cannot find symbol
if (player.hasPermissionLevel(4)) {
^
symbol: method hasPermissionLevel(int)
location: variable player of type ServerPlayerEntity
=== COMPILATION ERROR ANALYSIS ===
MISSING METHODS:
- hasPermissionLevel(int)
- getServer()
- hash(String)
ACTION: Check method names and signatures
FILES TO INVESTIGATE:
- src/main/java/net/bng/bnglan/command/BngLanCommands.java
- src/main/java/net/bng/bnglan/host/HostManager.java
- src/main/java/net/bng/bnglan/auth/SessionManager.java
- src/main/java/net/bng/bnglan/command/BngLanCommands.java
- src/main/java/net/bng/bnglan/host/HostManager.java
- src/main/java/net/bng/bnglan/auth/SessionManager.java
Please fix this error by creating a new artifact with the corrected code.
Correct the Yarn 1.21.11 API usages in the three failing classes.
Rebuild the missing token-hash helper and replace abstract text-event construction with factory methods.
Emit a corrected artifact with only the necessary source changes.
Created the corrected artifact.
Fixes applied:
Replaced unavailable
hasPermissionLevel(int)calls with operator checks throughPlayerManager.isOperator(...).Replaced
ServerPlayerEntity#getServer()with the existingHostManager.serverreference.Added the missing SHA-256
hash(String)implementation.Replaced abstract text event constructors with 1.21.11 factories:
ClickEvent.copyToClipboard(...)HoverEvent.showText(...)
Updated files:
BngLanCommands.javaHostManager.javaSessionManager.java
Check all issues and give me mod
Fix mapped API and lifecycle issues, including operator checks without player-world access.
Harden persisted config/state and relay response validation against malformed data.
Make asynchronous start/stop operations safe across disconnects and server shutdown.
Tighten command/GUИ behavior and produce the corrected mod artifact.
Finish shutdown and configuration edge cases, including cancelling an in-progress start and preventing callbacks from touching a stopped server.
Audited and corrected the BNGLan mod artifact.
Fixed:
Removed obsolete entity/server access patterns.
Added safe operator authentication using the active
MinecraftServer.Added missing configuration and host-state normalization.
Added warnings for malformed JSON configuration/state.
Validated relay responses before saving sessions.
Handled invalid relay URLs safely.
Protected async relay callbacks during server shutdown.
Cancelled in-progress host startup when stopping.
Prevented stale callbacks from changing state after restart/shutdown.
Added connection checks before sending async messages.
Added authorization checks to
/bng status.Improved GUI usability checks.
Set the mod environment to dedicated server.
Cleared stale relay sessions when the server starts.
Updated artifact files:
BngConfig.javaConfigManager.javaHostState.javaHostStateStore.javaSessionManager.javaHttpRelayClient.javaHostManager.javaWorldMenuScreenHandler.javafabric.mod.json
One infrastructure issue remains: the project has no Gradle wrapper (gradlew) and no system Gradle executable, so the final compilation could not be run in this environment. The source artifact is corrected and ready to compile with the configured Fabric Loom 1.14 toolchain.
Give me download link
I can’t provide a download link because no compiled .jar artifact exists in the project yet—the build environment lacks Gradle, and no file was uploaded or hosted.
After compiling locally, the mod should be available at:
build/libs/bnglan-<version>.jar
Run:
./gradlew build
Then upload the resulting JAR to your preferred file host (GitHub Releases, Modrinth, CurseForge, or Google Drive) to create a download link.
./gradlew build
I can’t run ./gradlew build in this environment because the project has no Gradle wrapper and Gradle is unavailable here.
From the project root, install/use Gradle and run:
gradle build
If you add the wrapper first:
gradle wrapper --gradle-version 8.14
./gradlew build
The compiled mod should then be located at:
build/libs/bnglan-<version>.jar
gradle wrapper --gradle-version 8.14 ./gradlew build
Run these commands from the project root:
gradle wrapper --gradle-version 8.14 && ./gradlew build
If successful, the mod JAR will be in:
build/libs/
I can’t execute the build or generate a download link from this environment because Gradle and the Gradle wrapper are unavailable here.
gradle wrapper --gradle-version 8.14 && ./gradlew build
I can’t execute that command in this environment because Gradle is unavailable and the project has no existing wrapper.
Run it locally from the project root:
gradle wrapper --gradle-version 8.14 && ./gradlew build
The compiled mod will be generated in:
build/libs/
gradle wrapper --gradle-version 8.14 && ./gradlew build
I can’t execute it here because Gradle is not installed and the project does not contain a Gradle wrapper.
Run this locally from the project root:
gradle wrapper --gradle-version 8.14 && ./gradlew build
The compiled JAR will be generated under:
build/libs/
gradle wrapper --gradle-version 8.14 && ./gradlew build
I can’t execute gradle wrapper --gradle-version 8.14 && ./gradlew build in this environment because Gradle is unavailable and the project has no wrapper.
Run it locally from the project root:
gradle wrapper --gradle-version 8.14 && ./gradlew build
The compiled mod will be created at:
build/libs/
If the build reports errors, send the complete output and I’ll fix them.
Compilation failed with 16 error(s):
ERROR in src/main/java/net/bng/bnglan/command/BngLanCommands.java at line 28: cannot find symbol .requires(source -> source.hasPermissionLevel(4)) ^ symbol: method hasPermissionLevel(int) location: variable source of type ServerCommandSource
ERROR in src/main/java/net/bng/bnglan/command/BngLanCommands.java at line 34: ClickEvent is abstract; cannot be instantiated .withClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, token))); ^
ERROR in src/main/java/net/bng/bnglan/host/HostManager.java at line 74: cannot find symbol List<WorldSelection> selections = availableWorlds(player.getServer()); ^ symbol: method getServer() location: variable player of type ServerPlayerEntity
ERROR in src/main/java/net/bng/bnglan/host/HostManager.java at line 189: HoverEvent is abstract; cannot be instantiated .withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Text.literal("Copy join link")))); ^
ERROR in src/main/java/net/bng/bnglan/host/HostManager.java at line 188: ClickEvent is abstract; cannot be instantiated .withClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, link)) ^
ERROR in src/main/java/net/bng/bnglan/auth/SessionManager.java at line 32: cannot find symbol state.managementTokenHash = hash(token); ^ symbol: method hash(String) location: class SessionManager
ERROR in src/main/java/net/bng/bnglan/auth/SessionManager.java at line 40: cannot find symbol hash(token).getBytes(StandardCharsets.UTF_8))) { ^ symbol: method hash(String) location: class SessionManager
ERROR in src/main/java/net/bng/bnglan/auth/SessionManager.java at line 48: cannot find symbol if (player.hasPermissionLevel(4)) { ^ symbol: method hasPermissionLevel(int) location: variable player of type ServerPlayerEntity
ERROR in src/main/java/net/bng/bnglan/command/BngLanCommands.java at line 34: ClickEvent is abstract; cannot be instantiated .withClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, token))); ^
ERROR in src/main/java/net/bng/bnglan/host/HostManager.java at line 189: HoverEvent is abstract; cannot be instantiated .withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Text.literal("Copy join link")))); ^
ERROR in src/main/java/net/bng/bnglan/host/HostManager.java at line 188: ClickEvent is abstract; cannot be instantiated .withClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, link)) ^
ERROR in src/main/java/net/bng/bnglan/command/BngLanCommands.java at line 28: cannot find symbol .requires(source -> source.hasPermissionLevel(4)) ^ symbol: method hasPermissionLevel(int) location: variable source of type ServerCommandSource
ERROR in src/main/java/net/bng/bnglan/host/HostManager.java at line 74: cannot find symbol List<WorldSelection> selections = availableWorlds(player.getServer()); ^ symbol: method getServer() location: variable player of type ServerPlayerEntity
ERROR in src/main/java/net/bng/bnglan/auth/SessionManager.java at line 32: cannot find symbol state.managementTokenHash = hash(token); ^ symbol: method hash(String) location: class SessionManager
ERROR in src/main/java/net/bng/bnglan/auth/SessionManager.java at line 40: cannot find symbol hash(token).getBytes(StandardCharsets.UTF_8))) { ^ symbol: method hash(String) location: class SessionManager
ERROR in src/main/java/net/bng/bnglan/auth/SessionManager.java at line 48: cannot find symbol if (player.hasPermissionLevel(4)) { ^ symbol: method hasPermissionLevel(int) location: variable player of type ServerPlayerEntity
=== COMPILATION ERROR ANALYSIS ===
MISSING METHODS: - hasPermissionLevel(int) - getServer() - hash(String) ACTION: Check method names and signatures
FILES TO INVESTIGATE: - src/main/java/net/bng/bnglan/command/BngLanCommands.java - src/main/java/net/bng/bnglan/host/HostManager.java - src/main/java/net/bng/bnglan/auth/SessionManager.java - src/main/java/net/bng/bnglan/command/BngLanCommands.java - src/main/java/net/bng/bnglan/host/HostManager.java - src/main/java/net/bng/bnglan/auth/SessionManager.java
Replace the outdated Yarn permission, server-access, and text-component APIs.
Restore the missing token hash helper without changing authentication behavior.
Patch the three reported source files with the smallest compatible changes.
Those errors are from an older source revision. The current project files already contain the fixes:
BngLanCommands.javausessource.getServer().getPlayerManager().isOperator(...).ClickEvent.copyToClipboard(...)is used instead ofnew ClickEvent(...).HostManager.javauses the manager’sserverfield.ClickEvent.copyToClipboard(...)andHoverEvent.showText(...)are used.SessionManager.javacontains the SHA-256hash(String)method.Operator checks use
server.getPlayerManager().isOperator(...).
Update your local project to the latest files, then run a clean build:
git pull
./gradlew clean build
If you are copying files manually, verify these searches return no outdated usages:
grep -RInE \
'hasPermissionLevel|getServer\(\)|new ClickEvent|new HoverEvent' \
src/main/java/net/bng/bnglan
The only permitted server lookup should be through ServerCommandSource#getServer() or the manager’s stored MinecraftServer; the reported line numbers do not match the current source revision.
Give me .jar file
No .jar file is available in the project yet—build/libs/ is empty, and no Gradle wrapper or compiled JAR was found.
Build it locally from the project root:
gradle wrapper --gradle-version 8.14
./gradlew clean build
Then find the file at:
build/libs/
Upload the resulting JAR here or provide the build output if compilation still fails.
gradle wrapper --gradle-version 8.14 ./gradlew clean build
I can’t execute Gradle commands or generate the .jar in this environment because Gradle is unavailable here.
Run locally from the project root:
gradle wrapper --gradle-version 8.14 && ./gradlew clean build
The compiled file will be in:
build/libs/
If the build fails, send the complete error output and I’ll fix the source.
Regenerate the complete BNGLan project with a working Gradle Wrapper.
Include:
- gradlew
- gradlew.bat
- gradle/wrapper/*
- build.gradle
- settings.gradle
- All source code
The project must build successfully using: ./gradlew build and generate the mod JAR in build/libs/.
Audit the existing BNGLan sources and current Gradle configuration.
Replace outdated APIs and regenerate the complete Gradle wrapper/build setup.
Verify all required source/resources are present and the project is configured to produce
build/libs/*.jar.
Regenerated the BNGLan Gradle project with:
gradlewgradlew.batgradle/wrapper/gradle-wrapper.propertiesGradle 8.14 bootstrap download logic
Fabric Loom 1.14 build configuration
Java 21 configuration
Existing BNGLan source and resources
JAR output configuration for
build/libs/
On Linux/macOS, make the wrapper executable once:
chmod +x gradlew
./gradlew build
The compiled mod JAR will be generated in:
build/libs/
The wrapper automatically downloads Gradle 8.14 if it is not already installed.
package net.bng.bnglan;
import net.bng.bnglan.command.BngLanCommands;
import net.bng.bnglan.config.BngConfig;
import net.bng.bnglan.config.ConfigManager;
import net.bng.bnglan.host.HostManager;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public final class BngLanMod implements ModInitializer {
public static final String MOD_ID = "bnglan";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
@Override
public void onInitialize() {
BngConfig config = ConfigManager.load();
HostManager hostManager = new HostManager(config);
CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) ->
BngLanCommands.register(dispatcher, hostManager));
ServerLifecycleEvents.SERVER_STARTED.register(hostManager::serverStarted);
ServerLifecycleEvents.SERVER_STOPPING.register(hostManager::serverStopping);
ServerTickEvents.END_SERVER_TICK.register(hostManager::tick);
ServerPlayConnectionEvents.JOIN.register((handler, sender, server) ->
hostManager.playerJoined(handler.getPlayer()));
}
}