▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Magnus
Magnus

Magnus

A modular, high-performance, and resilient synchronization suite for Minecraft Fabric servers. Features real-time inventory sync, cross-server chat, and global player management.

Оцените первым
314
0

Magnus (Server-Side)

!Build Status !Minecraft Version !Fabric !Kotlin !GitHub Release Modrinth Version

!PostgreSQL !Redis !Trivy !License

A modular, high-performance, and resilient synchronization suite for Minecraft Fabric servers. Features real-time inventory sync, cross-server chat, and global player management.

Features

Core Sync

  • Multi-Server Sync: Syncs Inventory, Ender Chest, Health, Hunger, XP, Potion Effects.
  • High Performance: Uses Redis for sub-millisecond data retrieval.
  • Persistence: Uses PostgreSQL for permanent reliable storage.
  • Fault Tolerance:
    • Circuit Breaker: Detects database failures automatically.
    • Local Fallback: Saves data to disk if the database goes down.
    • Auto-Recovery: "The Janitor" service automatically restores data when the database comes back online.

Modules

ModuleDescription
Inventory SyncCore synchronization of inventory, ender chest, health, hunger, XP, and potion effects. Enabled by default.
Global ChatSyncs chat messages across all servers via Redis pub/sub. Raw text format for compatibility with LuckPerms, Stylist, etc.
Global Player ListMaintains a global player count with heartbeat. Provides /glist command.
Session LockPrevents concurrent logins by locking player sessions during sync. Players are held in queue until their data is safely transferred.

Security

FeatureDefaultDescription
Message Signing✅ EnabledHMAC-SHA256 prevents message injection attacks
Auto-Generated Secret✅32-byte cryptographic secret generated on first run
Replay Prevention30 secMessages older than 30 seconds are rejected
Payload Size Limits64KBPrevents DoS via oversized messages
SSL/TLS SupportOptionalEncrypt Redis connections

Configuration

Magnus requires a PostgreSQL database and a Redis instance to function.

  1. Generate Config: Start your server once to generate the default configuration file at config/magnus.json.
  2. Edit Config: Stop the server and open config/magnus.json:
{
    "postgresUrl": "jdbc:postgresql://your-db-host:5432/magnus",
    "postgresUser": "your_user",
    "postgresPass": "your_password",
    "redisHost": "your-redis-host",
    "redisPort": 6379,
    "redisPass": null,
    "serverName": "survival",
    "enableInventorySync": true,
    "enableGlobalChat": false,
    "enableGlobalPlayerList": false,
    "enableSessionLock": false,
    "enableMessageSigning": true,
    "messageSigningSecret": "auto-generated-on-first-run",
    "redisSsl": false
}
  1. Launch: Restart your server. Magnus will automatically verify the connection and create the necessary database schema.

[!IMPORTANT] Multi-Server Setup: Copy the messageSigningSecret from the first server to all other servers. All servers must use the same secret.

Configuration Options

OptionDefaultDescription
serverName"default"Unique identifier for this server (e.g., "survival", "lobby")
enableInventorySynctrueEnable inventory/player data synchronization. Disable for lobby servers.
enableGlobalChatfalseEnable cross-server chat synchronization
enableGlobalPlayerListfalseEnable global player list and /glist command
enableSessionLockfalseEnable session locking to prevent concurrent logins
enableMessageSigningtrueEnable HMAC message signing (recommended)
redisSslfalseEnable SSL/TLS for Redis connections

Commands

CommandDescription
/glistShows total player count and players grouped by server (requires enableGlobalPlayerList)

Architecture

For detailed flow diagrams and behavior documentation:

  • Core Sync Flow - Data synchronization and fault tolerance
  • Global Chat Flow - Cross-server chat messaging
  • Global Player List Flow - Player list heartbeat and /glist
  • Session Lock Flow - Login queue and session locking
  • Message Security Flow - HMAC signing and replay prevention
  • Server Lifecycle Flow - Startup and shutdown sequence
Партнёрский материал

Как поиграть с друзьями с модом Magnus?

Мод Magnus куда интереснее в компании: поднимите сервер Майнкрафт с уже установленным модом, позовите друзей и играйте по своим правилам. Хостинг Майнкрафт для мода Magnus будет готов за пару минут - BungeeHost сделает всё за вас.

Часто задаваемые вопросы

Совместимость

Minecraft: Java Edition

1.21.x

Платформы

Зависимости

Ссылки

Создатели

Детали

Лицензия:
Опубликован:8 месяцев назад
Обновлён:3 недели назад
Главная