Nexus Ops

Server-side Discord status card and lag tools. Server-side only; players don't need to install anything, and unmodded clients can join.

Nexus Ops is a server-side management mod for dedicated Minecraft servers. It keeps one Discord status card up to date, can put staff buttons (broadcast, save, kick, restart, maintenance, item clear) right on that card, can show live status in a Discord bot's profile, finds what is lagging your server with readable, clickable lag scans, and warns you about crashes, freezes, low disk space, and old backups.

The card changes color with server health: green when things are healthy, yellow for a warning, red when the server is in a critical state, and gray if it goes offline. The title shows the server name and that state (for example, My Server • Healthy). Fields use plain language for TPS (current, plus 1-minute and 5-minute averages when available), MSPT average and peak, RAM, uptime, who is online, the busiest worlds with their own tick time, and the last lag scan. You choose which fields show.

Compatibility

Nexus Ops is server-side only: players don't need to install anything, and unmodded clients can join.

Currently available for NeoForge 1.21.1.

Features

  • One live Discord status card, created once and then edited in place
  • Modern card style with a status dot, a one-line summary, TPS and RAM bar meters, and an optional server icon (or keep the classic layout)
  • Webhook mode, or bot mode with live profile status ("Watching My Server • 3/20 • TPS 20") and a green/yellow/red status dot
  • Finds and reuses its own card if the saved id is lost, instead of posting a duplicate
  • Skips Discord edits when nothing important changed, with a regular refresh
  • Color and title follow the worst of TPS, MSPT, RAM, and optional per-world tick-time limits
  • Customizable title, footer, colors, offline text, shown fields, and per-state check intervals
  • Optional TPS-drop alerts with a cooldown and an optional role ping
  • Lag scans with readable names, the mod each result comes from, ms per tick and percent of the tick budget, totals by mod and by chunk, and counts per type
  • Flags pile-ups of dropped items, XP orbs, and crowded mobs
  • Clickable chat results to teleport to a source, chunk, or pile-up
  • Before and after: each scan is compared with the last, fixed entries are marked and dropped, and worse ones are flagged
  • Automatic short lag scan when the server stays Critical, attached to the alert
  • Optional Discord post of lag scan results
  • Webhook URLs and bot tokens are never written to the state file or logs
  • Crash alerts with the crash summary and the last log lines attached (secrets removed), and no alert on a normal stop
  • Freeze alerts when the server stops responding, showing where it is stuck, plus a "Recovered" note
  • A note on the next start if the last run didn't shut down normally
  • Disk space and backup age warnings, with an "all good again" note
  • Scheduled restarts with chat and Discord countdowns (off by default). It knows about your host's own restart times, so it never restarts twice in a row
  • Maintenance mode: only staff can join, and the card and bot status show Maintenance until you turn it off
  • Optional join/leave feed in Discord, and today's and all-time peak players on the card
  • Optional daily summary card with players, TPS, alerts, and uptime
  • Cleanup helper for item, XP, and mob piles: scan first, then confirm. Named, tamed, leashed, and ridden mobs, and anything near a player, are always kept
  • Force-loaded chunk check: see every force-loaded chunk, who owns it, how long it has been loaded, and what it costs, then release it with a confirm step. Spawn chunks are never touched
  • Multi-server dashboard: several servers can share one channel, each with its own card, or one combined network card
  • Discord slash commands in bot mode: /status, and /lagscan for staff roles
  • Process CPU on the card (CPU: 35% (avg 20%)), with a short rolling average
  • Card footer shows the running jar's version, for example Nexus Ops v1.4.0 • Updated
  • Worlds show ticking chunks against the loaded total (for example 9 ticking / 841 loaded)
  • RAM warnings use memory still in use after garbage collection, and say High memory instead of turning yellow just because used heap looks high
  • Advisory performance tips on the card when something looks off (a tip never changes the server)
  • Optional lag-chunk guard (off by default): warn, then clear dropped items and XP orbs only; repeat-offender chunks can unload; AFK players holding those chunks can be kicked (staff are not exempt)
  • Lag-guard offender history, with /nexusops offenders and an optional short "Top offenders" line on the card
  • Staff buttons on the card in bot mode (off by default): Broadcast, Save world, Item clear, Kick, Restart with countdown (or Cancel restart), and Maintenance on/off, with a Confirm click for anything disruptive
  • Audit log of every staff action, kept 30 days by default, with /nexusops audit and an optional Discord audit channel

Setup

  1. Drop nexusops-1.4.0.jar into the dedicated server mods folder and start the server once.
  2. Open config/nexusops-server.toml (some servers use world/serverconfig/).
  3. Webhook mode: create a Discord webhook for the channel and paste it into webhookUrl.
  4. Bot mode (optional): set mode = "bot", botToken, and channelId under [discord]. The bot needs View Channel, Send Messages, Embed Links, and Read Message History in that channel.
  5. Optionally set server_name, thresholds, and the look of the card. Changes are picked up automatically; /nexusops reload pushes a fresh update right away.
  6. Do not install the jar on clients, and never share a real webhook URL or bot token.

Commands

All commands require permission level 2 (operator):

  • /nexusops status — current health, TPS, MSPT, players, RAM, chunks, and entities
  • /nexusops lag [seconds] — scan for 5–60 seconds and list the top results
  • /nexusops lag last — show the last scan again
  • /nexusops lag stop — cancel a running scan
  • /nexusops tp <n>, /nexusops tp chunk <n>, /nexusops tp pile <n> — teleport to a result (or just click it in chat)
  • /nexusops restart — show the next planned restart; /nexusops restart in <minutes> restarts with a countdown; /nexusops restart cancel stops a countdown
  • /nexusops maintenance on [reason] / /nexusops maintenance off — turn maintenance mode on or off
  • /nexusops summary — today's numbers so far; /nexusops summary post posts the summary card now
  • /nexusops cleanup scan, then /nexusops cleanup confirm (or cancel) — clear item, XP, and mob piles
  • /nexusops chunks scan — list force-loaded chunks
  • /nexusops chunks release <number|all-idle>, then /nexusops chunks confirm (or cancel) — release force-loaded chunks
  • /nexusops offenders — recent lag-guard events; /nexusops offenders <player> for one player
  • /nexusops audit — recent staff actions (buttons and staff commands); /nexusops audit <name or id> for one person or target
  • /nexusops reload — push a fresh card update now, keeping the same card
  • /nexusops newcard — post a brand-new card on the next update (the old message is left alone)

Config

Main keys in nexusops-server.toml (1.0.x and 1.1.x files keep working; new settings are added with safe defaults):

  • webhookUrl — empty disables Discord in webhook mode
  • server_name — name on the card and alerts; empty uses the MOTD
  • intervalSeconds — 15–300, default 60
  • tpsWarn / tpsCrit, msptWarn / msptCrit, ramWarnPercent / ramCritPercent — health thresholds
  • tpsAlertThreshold / alertCooldownSeconds — TPS-drop alerts
  • lagSampleSeconds / lagTopN — lag scan defaults
  • [discord] — mode, botToken, channelId, presence, presenceFormat, alertRoleId, reuseExistingCard
  • [card] — style (modern or classic), thumbnailUrl, title, footer, offlineMessage, colorHealthy / colorWarning / colorCritical / colorOffline, showTps, showMspt, showRam, showCpu, showUptime, showPlayers, showWorlds, showWorldMspt, showLagScan, maxWorlds, maxPlayerNames
  • [updates] — skipUnchanged, refreshMinutes, healthyIntervalSeconds, warningIntervalSeconds, criticalIntervalSeconds
  • [thresholds] — worlds, for example ["minecraft:the_nether=30,45"]
  • [lag] — postToDiscord, discordTopN, autoScanOnCritical, autoScanAfterChecks, autoScanSeconds, autoScanCooldownMinutes, pileItems, pileXpOrbs, pileMobs, keepHistory, changePercent
  • [alerts] — crashAlerts, freezeAlerts, freezeSeconds, uncleanShutdownAlerts, logTailLines
  • [watch] — diskWatch, diskWarnFreePercent, diskCritFreePercent, diskMinFreeGb, backupFolder, backupMaxAgeHours, checkMinutes, alertCooldownHours
  • [restart] — enabled (off by default), times, timezone, warnSeconds, skipIfUptimeUnderMinutes, hostRestartTimes, hostWindowMinutes, discordCountdown, message, kickMessage
  • [maintenance] — message, allowedPlayers, allowWhitelisted, kickOnlinePlayers, discordNotice
  • [players] — joinLeaveFeed, feedWebhookUrl, feedChannelId, batchSeconds, showPeakOnCard
  • [summary] — enabled, time
  • [cleanup] — includeHostileMobs, protectRadius
  • [chunks] — autoReleaseIdle (off by default), idleOwnerDays
  • [dashboard] — serverId, sharedFolder, combinedCard, offlineAfterSeconds, title
  • [slashCommands] — enabled, guildId, staffRoleIds, statusForEveryone, lagScanSeconds, privateReplies
  • [tips] — enabled, cooldownHours, ramStreak, cpuPercent
  • [lagGuard] — enabled (off by default), entityThreshold, warnSeconds, repeatTimes, repeatMinutes, afkMinutes, kickMessage, holdRadiusChunks, denyTypes, allowTypes, discordNotice
  • [offenders] — retentionDays, showOnCard
  • [cardControls] — enabled (off by default), staffRoleIds, staffUserIds, restartCountdownMinutes, broadcastMaxLength, confirmSeconds
  • [audit] — enabled, retentionDays, channelId
  • [time] — timezone for restarts and the daily summary (empty = the server's own time zone)
  • [card] also has colorMaintenance

Force-loaded chunks, in plain words

Some chunks stay loaded even when nobody is near them, because of /forceload or a chunk loader block. Each one costs server time. /nexusops chunks scan lists them with a number, the owner (if known), how long it has been loaded, and its cost from the last lag scan. To free one, run /nexusops chunks release <number> and then /nexusops chunks confirm within a minute. all-idle picks the ones whose owner hasn't played for idleOwnerDays days. A mod may load its chunk again if its block is still there; break or turn off the loader to stop that for good. Spawn chunks are never released. Automatic release (autoReleaseIdle) is off unless you turn it on, and it never touches /forceload chunks.

Several servers, one channel

  • Separate cards: give each server its own serverId (like "survival" and "skyblock"). Each server keeps editing only its own card.
  • One combined card: set sharedFolder on every server to the same folder they can all reach. Then set combinedCard = true on just one of them. That server keeps a "Server network" card listing every server, and marks a server offline if it stops updating.

Slash commands (bot mode)

Set [slashCommands] enabled = true, your Discord server id in guildId, and the staff role ids in staffRoleIds. Invite the bot with the applications.commands scope and keep presence = true. Then run /nexusops reload. /status shows the card, and /lagscan runs a lag scan and replies with the results.

Card buttons (bot mode)

Staff can run everyday jobs straight from the status card. Buttons only show in bot mode; webhook mode stays the default and its card looks exactly the same as before.

Setup

  1. Create a Discord bot just for Nexus Ops and invite it with the bot and applications.commands scopes. It needs View Channel, Send Messages, Embed Links, and Read Message History in the card channel.
  2. Under [discord] set mode = "bot", botToken, channelId, and keep presence = true (this keeps the connection that receives clicks open).
  3. Under [slashCommands] set guildId to your Discord server id. Clicks from any other server are ignored.
  4. Under [cardControls] set enabled = true, and list who may click: staffRoleIds (Discord role ids) and/or staffUserIds (Discord user ids). If staffRoleIds is empty, slashCommands.staffRoleIds is used. If nobody is listed, nobody can use the buttons.
  5. Changes load on their own. A card that was posted by a webhook can't hold buttons, so the bot posts its own new card the first time; the old webhook message is left alone.

What each button does

  • ๐Ÿ“ข Broadcast — type a message; everyone online sees [Staff] your message in gold. Color codes and mentions are removed, and it is capped at broadcastMaxLength characters (default 256).
  • ๐Ÿ’พ Save world — saves the world and player data.
  • ๐Ÿงน Item clear — runs the cleanup scan, shows what it found, and removes it only after you press Confirm. Named, tamed, leashed, and ridden mobs, and anything near a player, are always kept.
  • ๐Ÿ‘ข Kick — type a player name (a unique start of the name is enough) and a reason, then Confirm. The player sees "Kicked by staff: your reason".
  • ๐Ÿ”„ Restart — after Confirm, starts the normal restart countdown (restartCountdownMinutes, default 5) with chat warnings. Your host's auto-restart must be on so the server comes back. While it counts down, the button turns into โœ‹ Cancel restart.
  • ๐Ÿ› ๏ธ Maintenance on / โœ… Maintenance off — turns maintenance mode on or off. The card shows Maintenance and the bot's Discord status changes to Maintenance, then back to Online. If maintenance.kickOnlinePlayers is on, turning it on asks for Confirm first.

Safety

  • Kick, Restart, Item clear, and a kicking Maintenance on need a second Confirm click from the same person within confirmSeconds (default 60). Each Confirm works once.
  • Every reply is private to the person who clicked, so the card stays a clean status board.
  • Clicks are handled off the server tick; only the action itself runs on the server thread, so the buttons add no lag.

Audit log

Every button action, every denied click, and the matching in-game staff commands (restart, restart cancel, maintenance on/off, cleanup confirm) are saved to world/data/nexusops-audit.jsonl with who, when, what, and the result. Secrets are scrubbed from every row. Rows older than [audit] retentionDays (default 30) are removed automatically, and [audit] enabled = false turns the log off. /nexusops audit shows recent entries, and /nexusops audit <name or id> filters them. Set [audit] channelId (bot mode) to get a short note in a Discord channel for each staff action.

 

More to come
More features will be added as the need arises or by request. Have an idea? Drop it in the comments.

License

MIT.

Made with help from AI tools.

Nexus Ops Team

profile avatar
  • 1
    Followers
  • 6
    Projects
  • 13.0K
    Downloads

More from Khaos_KiritoView all