Building from Source
On this page
NationCore is a standard Maven project.
- JDK 21 (
maven.compiler.releaseis set to 21). - Maven 3.9+ β or use the bundled helper script, which downloads a portable Maven for you.
mvn clean packageThe finished jar lands in target/NationCore-2.0.0.jar.
The snapshot profile appends a build suffix to the jar name and to the version
reported in plugin.yml:
mvn clean package -Psnapshot
# -> target/NationCore-2.0.0.SNAPSHOT-42.jarbuild.ps1 finds a local JDK, downloads a portable Maven if none is on the PATH,
then runs the build:
.\build.ps1 # same as: mvn clean package
.\build.ps1 -psnapshot # same as: mvn clean package -Psnapshot
.\build.ps1 clean install -DskipTestssrc/main/java/id/nationcore/
βββ NationCore.java Plugin entry point: config loading, managers, schedulers
βββ api/ NationCoreAPI β the public surface for other plugins
βββ commands/ NationCommand β /nationcore and its tab completion
βββ gui/ All inventory menus, grouped per government type
βββ integration/ FactoryCore, ApartmentCore, land permits, squaremap
βββ listeners/ Bukkit event handlers
βββ managers/ One manager per system (nations, tax, elections, β¦)
βββ models/ Plain data classes saved to JSON
βββ placeholders/ PlaceholderAPI expansion
βββ utils/ Message formatting and the Vault hook
src/main/resources/
βββ plugin.yml Command, permissions, soft depends
βββ config.yml Main configuration
βββ language.yml All messages
βββ order.yaml Executive-order catalogue
βββ research.yml Research catalogue
βββ nations/ Per-government configuration
βββ squaremap/ Live-map HTML templatesAll dependencies are provided β nothing is bundled into the jar except what the
shade plugin repackages.
| Dependency | Version | Why |
|---|---|---|
io.papermc.paper:paper-api |
1.21.4-R0.1-SNAPSHOT | The server API. |
com.github.MilkBowl:VaultAPI |
1.7 | Economy access. |
me.clip:placeholderapi |
2.11.6 | Placeholder expansion. |
xyz.jpenilla:squaremap-api |
1.3.4 | Live web map. Adventure classes are excluded so Paper's own Adventure version wins. |
Repositories used: PaperMC, Spigot snapshots, JitPack and the PlaceholderAPI repo.
src/main/resources is filtered by Maven, so plugin.yml can use
${project.version} and ${build.suffix}. That is how the snapshot number ends up
in the version string the server reports.
- Copy the jar into a Paper 1.21.4 test server with Vault and an economy plugin.
- Start the server and confirm the splash screen appears.
- Run
/nc hub, create a nation, and check thatplugins/NationCore/data/nations.jsonis written.