How horizonsendmc/ion works
Project type and purpose
• This is a multi-module Gradle Kotlin project that implements a Minecraft network plugin.
• It consists of three modules:
• common – shared library of database, cache, Redis, and utility components
• proxy – a Waterfall/Velocity proxy plugin (IonProxy)
• server – a Paper/Spigot server plugin (IonServer)
• Purpose: on Horizon’s End network, the Proxy plugin handles cross-server commands, Discord integration, and caching; the Server plugin handles world logic, Star Legacy features, and persistent data.
File structure
• Top-level modules: common/, proxy/, server/
• run/config/ contains Docker Compose and per-service configs (MongoDB, Paper server, Velocity/Waterfall proxy)
• common module contains: database schema, cache managers, Redis pub/sub, configuration classes, shared utilities
• proxy module relies on Velocity API, uses Redis for messaging & common caches, has Discord and command features
• server module relies on Bukkit/Paper API, uses common DBManager (Mongo), Redis messaging, implements game features (starships, AI, multiblock, transport, etc.)
• build.gradle.kts and Gradle wrapper for build orchestration
Key architecture details from README
• Two plugins: IonProxy.jar, IonServer.jar
• Shared foundation: Star Legacy plugin extended
• Test environment spun up via Docker Compose: Velocity/Waterfall proxy, Paper server, MongoDB, Redis
a. Minecraft Clients
b. Network Proxy container (Waterfall/Velocity) hosting IonProxy plugin
c. Game Server container (Paper/Spigot) hosting IonServer plugin
d. common library embedded in both plugins
e. MongoDB (persistent storage)
f. Redis (pub/sub & caches)
g. External Services: Discord API
Relationships & interactions
• Clients → Proxy plugin: commands, chat, server-list pings
• Proxy plugin ↔ Redis: publish/subscribe messages, cache population
• Proxy plugin → common: shared DB and util code
• Proxy plugin → Discord: HTTP calls to send messages
• Proxy plugin → backends: plugin messaging channels (Velocity→Paper forwarding)
• Server plugin ↔ Redis: subscribes to forwarded messages, caches data
• Server plugin → MongoDB: load/save schemas via common DBManager
• Server plugin → Discord: HTTP calls via common DiscordConfiguration
• Server plugin → common: shared code for caching, DB, utilities
Architectural patterns & principles
• Modular multi-project Gradle build (common, proxy, server)
• Shared library for DRY: “common” module
• Pub/Sub via Redis for decoupling cross-process communication
• Containerized microservices in local test (Docker Compose)
• Plugin messaging and forwarding between proxy and server
Technologies & frameworks
• Kotlin, Gradle Kotlin DSL
• Velocity/Waterfall Proxy API
• Paper/Spigot Server API
• MongoDB (NoSQL persistence)
• Redis (cache & messaging)
• Discord HTTP API integration
• Docker & Docker Compose for test environment
Detail level
• Major components and how they interact
• Don’t try to show every package or class; focus on module boundaries, data flow, and technology touchpoints
• Redis pub/sub as the decoupling mechanism between Proxy and Server