Expansion Plugin
A plugin that hard-depends on Medieval Factions and extends the simulation — declaring the dependency in plugin.yml and reusing the flagship's identifiers, events, and permission model.
An expansion is a plugin that cannot run on its own. It declares depend: [MedievalFactions] in plugin.yml — not softdepend — so Bukkit refuses to enable it when the flagship is absent, and it reaches directly into the flagship's types.
What an expansion reuses
Currencies is the cleanest current example, and it borrows four things:
- Identifiers.
Currencyholds anMfFactionId— the flagship's own Value Class Identifier — rather than a stringly-typed faction reference. - Architecture. Its own
Servicesregistry,JooqCurrencyRepository, Flyway migrations, andversioncolumn mirror the flagship's shape exactly. - Events.
FactionCreateListenerandFactionDisbandListenersubscribe to Faction Events, which is how a currency is retired when its issuing faction disbands. - Permissions.
CurrenciesFactionPermissionscallsaddPermissionTypeon the flagship's own registry, addingCREATE_CURRENCY,MINT_CURRENCY, and three per-currency permissions to the flagship's Faction Permission model — so minting rights are granted through the same/f rolecommands as everything else.
That fourth point is the one that makes an expansion feel native rather than bolted on: a player never learns a separate permission system.
Its own database
Each expansion runs its own Hikari pool, Flyway history, and jOOQ context against its own tables. It does not read the flagship's schema. The coupling is through the Java API and the event bus, never through shared SQL — so a schema change in the flagship cannot break an expansion silently.
Two generations
Fiefs predates this pattern. It is Java, targets Medieval Factions 4 through a vendored jar, and integrates through its own MedievalFactionsIntegrator rather than by importing flagship types. Reading both side by side is the fastest way to see what the version 5 rewrite changed.
Related
Expansions are listed in the flagship's own README, which is how server owners discover them.