How winterhavenmc/messagebuilderlib works
Main Components
a) Core Components:
• MessageBuilder (Central Component)
• LanguageHandler System
• Macro Processing System
• YAML Configuration System
b) Data Components:
• Message Records
• Item Records
• Language Files
┌─ Client Layer ─────────────────────┐
• Plugin Implementation │
• (MessageId & Macro Enums) │
• ┬───────────────────┘
• ↓
┌─ API Layer ──────────────────────┐
• MessageBuilder<T,E> │
• ┬──────────────────┘
• ↓
┌─ Core Processing Layer ──────────────────────────────┐
• ┌─────────────┐ ┌──────────────┐ ┌────────────────┐ │
• LanguageHandler│ │MacroProcessor│ │YamlFileHandler │ │
• ┘ └──────────────┘ └────────────────┘ │
• ┬──────────────────────────────┘
• ↓
┌─ Processing Components Layer ────────────────────────┐
• ┌─────────────────────────┐ ┌───────────────────┐ │
• Processor Registry │ │MacroObjectMap │ │
• ┘ └───────────────────┘ │
• ┌─────────────────────────────────────────────────┐ │
• Individual Processors (Command, Entity, etc.) │ │
• ┘ │
• ┬──────────────────────────────┘
• ↓
┌─ Storage Layer ────────────────────────────────────┐
• ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │
• Language Files│ │Message Cache │ │Config Files │ │
• ┘ └──────────────┘ └──────────────┘ │
• ┘
Important Relationships
a) Data Flow:
• Plugin → MessageBuilder → MacroProcessor → Final Output
• Language Files → LanguageHandler → MessageBuilder
• Configuration → YamlFileHandler → System Components
b) Dependencies:
• How Processors register with ProcessorRegistry
• How MacroObjectMap interfaces with Processors
• Language file loading flow
Implementation Details to Highlight
• Processor hierarchy with AbstractProcessor
• YAML file structure for messages and items
• Cooldown mechanism
• How macro processing interfaces with different object types
Notes
• Keep the main flow clear and centered
• Related processors together
• Test coverage relationship
• Extension points for custom processors