DPC Zettelkasten Open in the explorer

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:

  1. Identifiers. Currency holds an MfFactionId — the flagship's own Value Class Identifier — rather than a stringly-typed faction reference.
  2. Architecture. Its own Services registry, JooqCurrencyRepository, Flyway migrations, and version column mirror the flagship's shape exactly.
  3. Events. FactionCreateListener and FactionDisbandListener subscribe to Faction Events, which is how a currency is retired when its issuing faction disbands.
  4. Permissions. CurrenciesFactionPermissions calls addPermissionType on the flagship's own registry, adding CREATE_CURRENCY, MINT_CURRENCY, and three per-currency permissions to the flagship's Faction Permission model — so minting rights are granted through the same /f role commands 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.

Expansions are listed in the flagship's own README, which is how server owners discover them.

Sources

Linked from