Middle-Earth Additions: Factions
The Middle-Earth Additions: Factions addon is a powerful extension for the Middle-Earth mod that automatically tracks player faction affiliations and provides seamless integration with PlaceholderAPI-compatible mods. An ideal solution for servers wanting to display faction information in chat, prefixes, and other interface elements.

Key Features
Automatic Faction Tracking
- Instant Detection: System automatically detects when players join factions in the Middle-Earth mod
- Reliable Storage: Faction data is saved in JSON format in the world save folder
- Ease of Use: Works immediately after installation without additional configuration
PlaceholderAPI Integration
- Universal Compatibility: Compatible with StyledChat, LuckPerms, and any mods supporting PlaceholderAPI
- Diverse Placeholders: Provides various placeholder formats for different usage scenarios
- Optional Dependency: Functions independently but extends capabilities when PlaceholderAPI is present
Title Menu (New Feature)
- Opening Menu: Press the default O key to open the faction title menu during gameplay. The key can be reassigned in control settings under the "Middle Earth Additions" category
- Faction Panel: Compact panel shows your current faction icon and five title nodes
- Good/Evil Variants: Menu adapts to your affiliation (good/evil), changing button icons and rank names (e.g., Soldier→Knight→Captain→Baron→Lord vs Warrior→Uruk→Chieftain→General→Overlord)
- Linear Progression: Unlocks must occur sequentially. Attempting to preview or unlock a subsequent node shows prerequisite message
- Requirements & Feedback: Tooltips display silver coin, gold coin, and experience level requirements with color-coded status. Insufficient resources or missing prerequisites are displayed via action bar messages
- Faction Icon: Faction button in the top left corner displays appropriate item for the faction (e.g., Gondor shield, Mordor wooden shield, etc.)
- Unlocked Perks List: Panel lists perks for unlocked ranks (examples: +10% speed boost, +0.5 arrow damage, +1 heart, resistance aura)
Player Commands
- Display Toggle: Players can control the display of their faction in chat
- Testing Tools: Built-in commands for debugging and testing placeholder functionality
Developer API
- Public API: Clean interface for other mods to access faction data
- Type Safety: Proper null value handling and error management
- Documentation: Complete JavaDoc and usage examples
Requirements
Required Dependencies
- Minecraft: 1.21.1
- Fabric Loader: 0.16.14+
- Fabric API: Latest version
- Middle-Earth Mod: 1.5.3-1.21.1-alpha or compatible version
Optional Dependencies
- PlaceholderAPI: 2.4.0+ (for extended placeholder support)
- StyledChat: For chat formatting integration
- LuckPerms: For permission-based prefix/suffix integration
Installation
- Install Fabric Loader and Fabric API
- Install the Middle-Earth mod
- Download and place this mod in the mods folder
- (Optional) Install PlaceholderAPI for extended compatibility
- Start your server/world
Available Placeholders
Basic Placeholders
| Placeholder | Description | Example Output |
|---|---|---|
| %mefaction% | Formatted faction name | Gondor |
| %mefaction_full% | Full faction identifier | me:gondor |
| %mefaction_display% | Name with faction (if enabled) | [Gondor] PlayerName |
| %metitle% | Player title name | Soldier |
Supported Factions
All Middle-Earth mod factions are supported with proper formatting:
| Faction ID | Display Name |
|---|---|
| me:gondor | Gondor |
| me:rohan | Rohan |
| me:dale | Dale |
| me:longbeards | Longbeards |
| me:longbeards.erebor | Erebor |
| me:lothlorien | Lothlórien |
| me:mordor | Mordor |
| me:misty_mountains_goblins | Misty Mountains |
| me:isengard | Isengard |
| me:shire | Shire |
| me:bandit | Bandit |
Usage Examples
StyledChat Integration
{
"chat": {
"format": "<%mefaction% {player_name}> {message}"
}
}
Result:
LuckPerms Prefix
/lp user PlayerName meta setprefix 100 "%mefaction% "
Result: Player appears as Gondor PlayerName
Custom Chat Formatting
{
"style": {
"chat": "[%mefaction%] %player% » %message%"
}
}
Result: [Gondor] PlayerName » Hello Middle-earth!
Commands
Player Commands
- /togglefaction - Toggle faction display in your name
- Shows your current faction status
- Provides preview of how your name will appear
Administrator Commands
- /viewfactiondata - View all stored faction data
- Lists all players and their factions
- Shows total player count
- /exportfactiondata - Show faction data file location
- Displays path to JSON storage file
- Shows current storage statistics
- /testfactionplaceholder - Test placeholder functionality
- Debug tool for server administrators
- Shows all available placeholders for a player
- Displays current toggle state
Data Storage
Faction data is automatically saved to [world]/faction_data.json:
{
"player-uuid-here": {
"playerId": "player-uuid",
"playerName": "PlayerName",
"disposition": "good",
"factionId": "me:gondor",
"spawnId": "me:gondor.minas_tirith",
"timestamp": 1672531200000
}
}
Data Fields
- playerId: Unique player identifier
- playerName: Current player name
- disposition: Faction alignment (good/evil/neutral)
- factionId: Full faction identifier from Middle-Earth mod
- spawnId: Associated spawn location
- timestamp: Last update time in milliseconds
Compatibility
Tested Compatibility
- ✅ StyledChat - Full chat formatting support
- ✅ LuckPerms - Prefix/suffix integration
- ✅ TAB - Scoreboard and tablist integration
- ✅ MiniMOTD - Server MOTD placeholders
Configuration
This mod is designed to work without configuration. All settings are automatically detected and configured based on your Middle-Earth mod installation.
Customization Options
- Player toggle states are preserved across server restarts
- Faction name formatting can be customized via the API
- JSON data location is tied to world saves for multi-world support