dwgx@blog:~$dwgx
> cd ../posts

One jar doing the work of ten plugins: DarkPixel

// created

DarkPixel is an all-in-one plugin for Paper 1.21.4 servers. It rolls the jobs you’d normally install a separate plugin for each of — lobby, ranks, anti-cheat, moderation tools — into a single jar. That way a version bump doesn’t turn into a gamble over which dependency blows up first, config doesn’t scatter everywhere, and features can share data directly.

Nothing fancy in the stack: Java 21, Paper API 1.21.4-R0.1-SNAPSHOT, Gradle 8.8. Dependencies are ProtocolLib, NBTAPI, and PacketEvents — packet handling and NBT can’t get around them; Gson and NanoHTTPD are shaded straight into the jar.

Every feature hangs off a single Global and pulls data from each other through it. The rank system has a built-in RankServer that spins up an HTTP endpoint via NanoHTTPD for cross-instance sync; if the port is taken it automatically falls back to client mode and connects to another instance instead of just failing to start and crashing. /aichat hooks into DeepSeek, with a whitelist and rate limiting. /dashboard is a chest menu, the DarkAC anti-cheat targets head-snap cheaters, /darkban and /freeze make up a set of moderation commands, and /reloadconfig does an async hot reload so you don’t have to restart to change config.

The main pitfall is packet handling: features like this are especially version-sensitive, so every time Paper updates you have to come back and check them over. I built in one safeguard on the database side — the MySQL password is read from the DARKPIXEL_DB_PASSWORD environment variable, so it doesn’t get committed by a slip of the hand someday. CI runs on GitHub Actions, Ubuntu + Temurin JDK 21, and builds the jar automatically on push.

It’s currently running at 1.0-SNAPSHOT, all the listed features work, and I’m still adding things on and off. The code is at github.com/dwgx/darkpixel, MIT — if you want to run a server, just take it and modify it.