Skip to content

Releases: RedZephon/Minecraft-Present-Bot

MC Presence v2.0.9

Choose a tag to compare

@github-actions github-actions released this 10 May 23:11

Fixes

  • Schedules without a tz field now auto-migrate to the browser's timezone — v2.0.8 added the timezone-aware scheduler but the Setup tab was rendering the browser's tz as a display fallback when the saved schedule.tz was empty. That made the field look configured (e.g. "America/Edmonton") while the server was silently still evaluating the window against its own system clock (UTC in a typical Unraid container) — disconnecting bots hours before the user expected. Symptom: schedule "09:00–22:00 America/Edmonton" disconnecting at 5:05 PM local because 5:05 PM Edmonton = 11:05 PM UTC > 22:00. On socket init, any bot whose schedule.tz is empty now gets stamped with the browser-resolved tz and persisted. New sessions created via createNewSession also include the browser tz from the start. The Timezone input now shows the actual saved value (with a clear "Empty — schedule will use the server's system clock until set." note if it really is empty).

MC Presence v2.0.8

Choose a tag to compare

@github-actions github-actions released this 10 May 22:59

Features

  • Timezone-aware scheduler — per-session IANA timezone field under Setup > Schedule. The connect/disconnect window is now evaluated against the chosen timezone instead of the server's local clock, so a bot running in a UTC container can still hold to a 09:00–17:00 America/Vancouver schedule. Field is a searchable input backed by the full Intl.supportedValuesOf('timeZone') list (~430 zones), defaulting to the browser's detected timezone. Existing schedules without a tz field continue to use the server's system TZ.

UI

  • Fixed misleading "24-hour time" note — the <input type="time"> renders in 12-hour with AM/PM on locales like en-US, so the helper text was contradicting itself. Note now reads "Times in your local 12-hour format. Schedule wraps midnight." The underlying value is still HH:MM (per the HTML spec) — no migration needed.

MC Presence v2.0.7

Choose a tag to compare

@github-actions github-actions released this 10 May 22:44

Features

  • Breaks system — per-session random "step away from the keyboard" simulation. Configure a check interval, hit chance, and min/max duration. While connected, the bot rolls the chance every N minutes; on a hit it disconnects for a random duration in [min, max] and reconnects automatically when the break ends. Auto-reconnect is suppressed during breaks (so the schedule/auto-reconnect loops don't fight the break timer). In scheduled mode, a break that ends outside the active window stays disconnected; the schedule ticker reconnects when the window reopens. A pill in Controls > Connection shows "On break — returning around HH:MM" while active. Config lives under Setup > Breaks.
  • Min-required break floor — extra fields under Setup > Breaks: "Force After (hr)" and "Forced Length (min)". If no break has happened within the floor window, the next check forces a fixed-duration break regardless of the random roll. Defaults: 3h floor / 10min forced. Set "Force After" to 0 to disable. Baseline for "no break yet" is the bot's connectedAt on first connection (so a freshly-connected bot isn't immediately overdue). lastBreakAt persists across server restarts.
  • Last Break readout — a "Last Break" row in Controls > Connection shows when the bot last took a break (e.g., "47m ago", "2h 15m ago", "Never"). Visible whenever breaks are enabled or a break has ever happened.

Fixes

  • CMI-nicknamed players' chat now classifies as real chat — the chat handler resolved senders by direct lookup in bot.players, which is keyed by real MC username. CMI (and Essentials, and any plugin that rewrites chat formats to show a nickname) sends the chat event with the visible nickname as the sender, so the lookup missed and the message fell through to the "Server" / plugin-broadcast branch — appearing in the UI as a non-chat system message and never reaching the AI handler. Added resolveChatSender() which falls back to matching against each player's displayName (with §-color codes stripped) when the direct lookup fails. UI now shows the nickname as the sender (matching what the player sees in-game) while AI/cooldowns/bot-account checks use the resolved real MC username. Whisper handler updated to the same resolver for consistency.
  • Asset cache-busting — index.html is now rendered at request time with the running APP_VERSION substituted into the asset URLs (/app.js?v=2.0.7, /app.css?v=2.0.7). Previously browsers could keep serving cached app.js after a container update, so users would see the new server version badge while still running the old UI (e.g., the v2.0.6 sidebar refactor not appearing until a manual hard-refresh). Bumping the version automatically invalidates the cached URLs on every release.
  • 26.1.x connect failure handled gracefully — the v2.0.6 dependency bump registered the protocol metadata for 26.1.2 but PrismarineJS hasn't shipped the per-version game-data directory yet, so minecraft-data('26.1.2') returned null and minecraft-protocol threw before login. A first attempt to override the wire protocol so the handshake would still claim 26.1.2 succeeded at login but immediately crashed post-login because too many packets changed shape between 1.21.11 and 26.1.2 — the bot would briefly appear in-game and then vanish (PartialReadError / Cannot read properties of undefined in inventory.js). Now: when a 26.X.Y server is detected via ping, the bot auto-falls-back to negotiating as 1.21.11. Connects cleanly if the server has ViaVersion (or another protocol-translation plugin) installed; if not, the server rejects with a clear "outdated client" message instead of crashing mid-stream. Manual override via the Version field in Setup still works. The fallback becomes a no-op automatically once PrismarineJS ships proper 26.x data.

MC Presence v2.0.6

Choose a tag to compare

@github-actions github-actions released this 10 May 21:40

Fixes

  • No more double Discord posts for real-account bots — sendBotMessage used to push to the Discord webhook for every send, including from authenticated mineflayer sessions. Those sessions already produce real in-game chat that the server-side Discord<->MC bridge mirrors, so every message landed in Discord twice. The webhook call is now bridge-only (CobbleBot AI and other virtual bots whose chat doesn't reliably round-trip through the MC bridge).

UI

  • Session settings folded into the right sidebar — the Add/Edit Session modal is gone. Every per-session field (label, bot type, email, host/port, auth, version, mode, schedule, AI mode, assistant name, toggles) now lives in the details panel and auto-saves on change. New sessions are created with sensible defaults via "+" and customized inline. Connection fields disable while connected/connecting (server already enforced this; the UI now reflects it). Removes the duplicate AI-mode picker (modal + sidebar) that could overwrite each other when both were active.
  • Focus-preserving re-render — typing into a sidebar input no longer gets wiped if a server-side botUpdated/botState event arrives mid-edit. Focus, cursor position, selection, and any unsaved value are restored on re-render.

Compatibility

  • Minecraft Java Edition 26.1.2 (protocol 775) supported — bumped mineflayer to ^4.37.1 (was ^4.35.0). Pulls in the matching minecraft-data / minecraft-protocol updates that recognize the new Mojang versioning scheme. The auto-detect regex in connectMineflayer already extracts 26.1.2-style names from server pings.

MC Presence v2.0.5

Choose a tag to compare

@github-actions github-actions released this 19 Apr 20:47

Fixes

  • Self-greeting bug — the self-check in the AI greeting path used strict === comparison which is case-sensitive. Minecraft usernames can arrive with different casing depending on the event source (tab list vs server broadcast), so a bot could end up saying "wb" to itself on join. Added isThisBot(entry, name) helper with case-insensitive comparison across MC username, label, and connectedUsername. Used in handlePlayerJoinAI, handleBridgePlayerJoin, and the mineflayer playerJoined handler. Self-skip is now logged so it's easy to verify.

MC Presence v2.0.4

Choose a tag to compare

@github-actions github-actions released this 19 Apr 20:34

Fixes

  • Avatars now use the correct MC username — connectedUsername was set server-side but never included in serializeBot, so the frontend always fell back to bot.label when rendering avatars via mc-heads.net. If a bot's label differed from its MC username, the default Steve skin was shown. The field is now exported.
  • Bridge-bot chat mirrors to all session logs — CobbleBot and other CobbleBridge-type bots broadcast via the plugin, but mineflayer sessions either don't receive those events or filter them as system messages (since the virtual player isn't in the tab list). Bridge-bot public messages are now mirrored directly into every other connected session's chat log as regular chat lines. Includes manual sends via the Chat input and AI-generated responses. Whispers are not mirrored. A de-dup guard in mineflayer's bot.on("chat") skips any line whose sender matches a known bridge-bot label.

MC Presence v2.0.3

Choose a tag to compare

@github-actions github-actions released this 19 Apr 20:28

Fixes

  • Missing sign-in messages — the v2.0.2 CobbleBridge suppression was global (any bridge event muted mineflayer's join/leave broadcast parse). If the plugin emitted quits but not joins, join messages vanished entirely. Suppression is now tracked per event type: joins are only suppressed while the bridge is actively emitting joins, quits only while it's actively emitting quits. If the plugin only emits one type, the other still flows through mineflayer's server broadcast.

MC Presence v2.0.2

Choose a tag to compare

@github-actions github-actions released this 19 Apr 20:21

Behavior audit fixes + codebase health pass.

Code health

  • Removed dead code — aiAssistant field (serialized, never read) and isBotWithAI helper (defined, never called).
  • Unified greeting logic — extracted buildGreetingMessage() + afterGreetingSent(); mineflayer and bridge paths no longer duplicate the welcome/wb template tree (~60 lines removed).
  • serializeBot chatLog trim — botUpdated emits no longer include the full 300-message log. The log is only sent on initial fetch (/api/status, socket connect, botAdded). The frontend already tracks individual chat events via the chat socket event. This prevents ~60KB/emit × clients fanout on every state change.
  • Bounded memory — hourly sweep evicts stale entries from aiCooldowns, recentGreetings, greetingCooldowns, frustrationOffers, recentOwnerChat, botSilenceUntil, lastAfkIssuedAt, and collapses botDailyStats to today's keys only.
  • botMcUsernames leak fixed — entries are now cleared when a bot disconnects, preventing stale name→id mappings.
  • Missing await — bridgeSendChat now awaits callBridgeAPI and logs bridge errors instead of dropping them.
  • Silent catches logged — refreshBridgePlayers now surfaces errors.
  • Per-bot timer tracking — registerBotTimeout() stores timer handles on the entry; disconnectBot, disconnectBridgeBot, and removeBot now cancel all pending timers so torn-down bots can't fire delayed callbacks (greeting delays, post-reply re-/afk, frustration offers, spawn-time /afk).

Reliability

  • Auto Reconnect toggle now works — the toggle was previously saved but never checked; reconnection was driven entirely by mode. Both scheduleReconnect() and the schedule ticker now honor autoReconnect.
  • Removed dead autoConnect legacy fallback in registerBot.

AI

  • Support bot silence command hardened — required multi-word phrases ("shut up", "stop talking", etc.). A bare "stop" no longer silences the bot. Resume/unmute only fires when the bot is actually silenced.
  • AFK Responder /afk automation — the bot now issues /afk on spawn (when admin-afk is configured), on mode activation, and re-issues it after public-chat replies (rate-limited to once per 60s). Toggling off admin-afk sends a second /afk to un-AFK.
  • Anti-AFK upgraded — the 45s loop now does look rotation + arm swing + a brief sneak pulse so it actually defeats CMI AFK detection. Skipped when the bot is in admin-afk mode.
  • Known players are now shared globally — welcome vs "wb" is consistent across all bots. Previously each bot tracked its own known-players set, so a fresh bot would welcome long-time players.
  • Unified first-time detection — resolveFirstTime() checks confirmed bridge flag, bridge-reported player file creation time (< 60s = new), then falls back to the global known-players set.

CobbleBridge

  • Bridge is now the source of truth when active — join/leave/death events from the plugin are routed to all session logs with consistent formatting (<player> logged in). Mineflayer bots suppress duplicate server-broadcast parses while the bridge is active (5-minute TTL after last event).

Discord

  • Webhook identity fixed — messages now always use the bot's MC username (or session label) as the Discord display name. Previously AI-mode messages showed as "Assistant" and manual bridge sends defaulted to "MC Presence", making it impossible to tell which session sent a message.

MC Presence v2.0.1

Choose a tag to compare

@github-actions github-actions released this 15 Apr 19:01

Fixes and improvements since the v2.0.0 launch.

Mobile

  • Slide-in sidebar drawer (hamburger menu) and details panel for mobile viewports
  • Combined actions dropdown replaces separate Switch/Disconnect buttons on small screens
  • Responsive settings page with horizontal tab bar instead of sidebar
  • Compact spacing for chat, messages, and input area
  • Hidden theme toggle and version badge on mobile (theme available via command palette)
  • Avatar flex-shrink fix to prevent distortion on narrow screens

Networking

  • SRV record resolution — hostnames like mc.example.com are now resolved via _minecraft._tcp SRV DNS records automatically. No need to enter the port separately if the domain has an SRV record.
  • Dynamic server address — changing the host in Settings now applies at connect time for all sessions. No need to edit each session individually.

Chat & Players

  • Plugin message filtering — messages from non-player senders (Lands, Skills, etc.) are now detected via the tab list and rendered as system messages instead of player chat
  • Duplicate join messages fixed — removed generic "joined" messages from the playerJoined handler; only the server's formatted broadcast is shown
  • First-time join detection — updated regex to handle [+] prefixed messages from servers
  • Player list refresh — 30-second polling loop keeps the sidebar player list current; fixes stale counts that could persist 10+ minutes
  • Join/leave icons — [+] messages render with green arrow, [-] with red arrow

AI

  • Global AI toggle — master switch in Settings > General to enable/disable all AI features. When off, hides AI mode selector in session details and AI Chat/Prompts tabs in Settings.
  • AI mode selector — replaced single toggle with full radio selector (Off, AFK Responder, Support Bot, Player Disguise) in the session details panel
  • Assistant name — only shown when Support Bot mode is selected
  • Default prompts seeded — prompt textareas in Settings now pre-fill with the built-in defaults so they're easy to review and customize

Settings

  • Full-page settings — replaced modal with full-screen tabbed layout (General, AI Chat, Prompts, Bridge)
  • Server name — new field to set a display name shown in the sidebar server card
  • Server favicon — Minecraft server icon from the protocol ping is displayed in the sidebar

CobbleBridge

  • Events route to all bots — CobbleBridge plugin events now benefit all connected sessions, not just bridge-type bots. Mineflayer bots get reliable first-time join detection and player list refresh from bridge events.

Other

  • Edit Session button added to the details panel Manage section
  • Sidebar panel toggle button uses a proper icon (table-columns)
  • Removed hardcoded "Red"/"Zeph" references from AI mention handler

MC Presence v2.0.0

Choose a tag to compare

@github-actions github-actions released this 15 Apr 04:21

Major UI rewrite and feature expansion for public open-source release.

UI Redesign

  • Complete frontend rewrite: split single-file SPA into index.html, app.css, and app.js
  • New three-panel layout: session sidebar, chat center, session details right panel
  • Design system with Figtree + JetBrains Mono fonts, teal accent color
  • Light/dark theme toggle with localStorage persistence and no flash of wrong theme
  • Chat messages now render with avatars, day dividers, and message grouping
  • System events (join/leave) display as compact single-line entries with icons
  • AI assistant messages show a distinct teal avatar with sparkles icon
  • Session details panel with Account, Connection, Behavior, and Danger Zone sections
  • Empty state for new installations with onboarding CTA
  • Command palette (Cmd/Ctrl+K) for quick actions: switch sessions, toggle theme, disconnect all
  • Slash command popup when typing / in chat input
  • Input hints below the chat field

New Features

  • Active Session ("Speaking As"): Explicit active session state — chat sends route through the selected session. Switch via sidebar click or Switch button dropdown.
  • Behavior Toggles: Per-session Auto-reconnect, Anti-AFK, and AI Assistant toggles in the details panel. Changes persist immediately to bots.json.
  • Anti-AFK: Connected bots with Anti-AFK enabled perform a small look movement every 45 seconds to prevent idle kicks.
  • Latency Tracking: Server polls connected bots for ping every 5 seconds and broadcasts session:metrics events. Displayed in the details panel and server card.
  • Configurable AI Assistant Name: Each session has an assistantName field (default "Assistant") displayed in chat and used in AI prompts.
  • Session Restart: One-click restart (disconnect + reconnect) from the details panel.

Backend Changes

  • New Socket.io events: active-session:set, active-session:changed, session:behavior:update, session:restart, session:remove, session:metrics
  • Active session auto-fallback: when the active bot disconnects, the next connected bot is selected
  • Chat send now uses the active session ID by default
  • Per-session fields added: autoReconnect, antiAfk, aiAssistant, assistantName
  • Migration: existing autoConnect configs are mapped to autoReconnect
  • AI system prompts now support {assistantName} placeholder

Branding Cleanup

  • Removed all personal references (specific server IPs, emails, usernames) from defaults and docs
  • Discord webhook username changed from hardcoded name to "MC Presence"
  • AI admin-afk handler no longer hardcodes specific player name mentions
  • Generic placeholders in .env.example and session modal defaults
  • README rewritten for public audience