Skip to main content

Project structure

A Maven multi-module project, Java 25.

FolderArtifactWhat it is
common/libraryWhat the proxy and the game servers share: the module system, player data, database access, the gRPC client of server-service, presence in Redis, permissions. Most of the stable API lives here.
paper/libraryThe Paper side: commands, services, events, placeholders, the region hooks.
modules/librariesThe modules shipped with GrayCore, one sub-module each (kits, warps). See Writing a module.
paper-dist/graycore-paper.jarPacks paper and the modules into the plugin installed on game servers. Also holds the test that keeps modules inside the stable API.
velocity/graycore-velocity.jarThe proxy plugin.
server-service/Spring Boot applicationThe registry of game servers, built as a Docker image by the CI.
samples/rpg-sample/graycore-rpg-sample.jarA plugin that adds a module from outside, as any plugin on top of GrayCore would: custom mobs with 3D models.
dev/The local development stack.
docs/This site.

Building and testing​

mvn verify # everything: build, unit tests, integration tests
mvn -pl samples/rpg-sample -am package # one artifact and what it depends on
  • Unit tests (Surefire) run with mvn test.
  • Integration tests (Failsafe, classes ending in IT) start PostgreSQL and Redis with Testcontainers: Docker must be running.
  • The CI (.github/workflows/build.yml) runs mvn verify on every push and pull request, then publishes the artifacts. .github/workflows/docs.yml builds this site and publishes it.

Technical choices​

  • Dependency injection on the game servers and the proxy is done by LightWired (@LightWired classes are created and wired at startup).
  • Commands use CommandAPI, relocated inside the jars. A plugin on top of GrayCore cannot use that copy: it is not part of the stable API (the RPG sample registers its command through Bukkit's command map).
  • Database: HikariCP and plain JDBC, the schema in Liquibase. Profiles are JSON (jsonb), written with Jackson.
  • Redis: Lettuce.
  • server-service: Spring Boot and Spring gRPC.
  • Texts: MiniMessage, through LocaleService.