LegacyShell WikiLegacyShell Wiki
Back to LegacyShell
Home
Wiki
Plugins
Docs
Back to LegacyShell
Home
Wiki
Plugins
Docs
  • Documentation

    • Getting Started

      • What is LegacyShell?
      • Speed Setup
      • Requirements
      • Installation
      • First Run
      • Config Files
      • Making an Account
      • Troubleshooting (Getting Started)
    • Running a Server

      • Architecture Overview
      • The Database
      • Users and Ranks
      • Adding Game Servers
      • Client Mirrors
      • Perpetual
      • Backups
      • Rate Limiting
      • Moderation
      • Closed Mode
      • Deployment
      • Troubleshooting (Running a Server)
      • Hosting for Someone Else's Instance
    • Content Creation

      • Maps
      • Dealing with Babylon Models
      • Map Blocks
      • Items and Skins
      • Hats and Stamps
      • Sounds
      • Gamemodes
      • Seasonal Events
    • Plugin Development

      • Quickstart
      • I Want To...
      • Anatomy of a Plugin
      • Lifecycle
      • Dependencies
      • Events (Concept)
      • Event Reference

        • services: events
        • game: events — shared logic (src/shell/)
        • game: events — main-thread server process
        • game: events — per-connection client object
        • game: events — room lifecycle & tick loop
        • game: events — in-browser gameplay
        • client: events — client server & build pipeline
      • Commands
      • Client-Side Code
      • Static Assets
      • Content Packs
      • Networking
      • Workers and State
      • Prediction and Authority
      • Recipes

        • Recipe: Killstreaks
        • Recipe: New Pickup Item
        • Recipe: New Gamemode
        • Recipe: Custom Weapon
        • Recipe: UI Modification
        • Recipe: Discord Integration
        • Recipe: Replacing Core Behaviour
        • Recipe: Persistent Plugin Storage
        • Recipe: Rewarding Players with Currency
        • Recipe: Custom Per-Player Data
        • Recipe: Custom Theme
      • Publishing
      • Pitfalls
      • Modifiers
      • Sound and Apollo
    • Codebase Reference

      • Repo Layout
      • Shared Shell Layer
      • Server-Only Markers
      • The ss Object
      • Build Pipeline
      • Stamps and Babylons
      • Game Loop
      • Rooms and Workers
      • Wire Protocol
      • Generated

        • Wire Protocol Opcodes
        • Enums & Lookup Tables
        • Database Schema
        • Config Reference
        • Slash Command Reference
      • Services Internals
      • Catalog and Items
      • Permissions Internals
      • Physics and Collision
      • Known Quirks
      • Codebase Anecdotes
      • Development Timeline
    • Contributing

      • Documentation Style Guide
      • Generators
      • For AI Agents

Event Reference

Audience: Plugin authors, AI agents · Prereqs: Events (concept)

The complete, table-form list of every event LegacyShell emits — one page per subsystem, each row extracted directly from source (event name, exact file:line, payload shape) with a human-written "fires when" description.

Pages

  • services: events — the services server's DB-seeding pipeline, auth flow, and command-boundary hooks.
  • game: events — shared logic — src/shell/*.js, fires from both the Node game server and the in-browser bundle.
  • game: events — main-thread server process — server-game/start-game.js, roomManager.js.
  • game: events — per-connection client object — server-game/src/client.js.
  • game: events — room lifecycle & tick loop — server-game/src/rooms.js, by far the largest single source of events in the codebase.
  • game: events — in-browser gameplay — the hand-maintained browser game source and its map editor.
  • client: events — the client server and its build pipeline.

How this stays accurate

These pages are generated, not hand-written — see the banner at the top of each one. src/scripts/gen-wiki-reference.js parses every plugins.emit(...) call site in the repo with a real JS parser (not regex), so the event name/location/payload columns can never silently drift from the actual code. The "fires when" column is the one part that's genuinely human-authored — it's pulled from src/scripts/event-descriptions.json, a small sidecar file mapping file#eventName to a one-sentence description; any event without an entry there renders as visibly undocumented rather than silently missing.

Regenerate after any change to plugins.emit(...) call sites or the events they cover:

npm run gen-docs

See Generators for the full mechanism, including the other four generated reference pages under Codebase Reference.


This page was drafted with AI assistance and reviewed for accuracy. If something looks wrong, please open a PR or flag it.

Edit this page on GitHub