48 lines
1.5 KiB
Markdown
48 lines
1.5 KiB
Markdown
# GameAPI
|
|
|
|
[](https://git.softwarerat.com/zlaura/GameAPI/actions)
|
|
|
|
Open-source network development API for building Minecraft minigames on Paper. Provides shared building blocks — game state management, world handling, player prefixes, inventory/item builders, and common event listeners — so individual minigame plugins (GhostHunt, MLGRush, AlleGegenEinen, ...) don't reimplement the same scaffolding.
|
|
|
|
## Requirements
|
|
|
|
- Java 21
|
|
- Maven
|
|
- Paper API 1.20.1
|
|
|
|
## Key packages
|
|
|
|
- `com.softwarerat.API.data.gameState` — `IGameState` / `GameStateManager` for lobby → ingame → ending state machines
|
|
- `com.softwarerat.API.data.prefix` — `PrefixAPI`, scoreboard-team-based player prefixes
|
|
- `com.softwarerat.API.data.world` — `WorldAPI`, world loading helpers
|
|
- `com.softwarerat.API.builder` — `SpigotItem` / `SpigotInventory` fluent builders
|
|
- `com.softwarerat.API.event.listener` — reusable listeners (join/quit/chat/build-break/spectator)
|
|
|
|
## Building
|
|
|
|
```bash
|
|
mvn -B package
|
|
```
|
|
|
|
## Using it in another project
|
|
|
|
GameAPI is published as a Maven snapshot to the private registry at `https://git.softwarerat.com/api/packages/zlaura/maven`:
|
|
|
|
```xml
|
|
<dependency>
|
|
<groupId>com.softwarerat</groupId>
|
|
<artifactId>GameAPI</artifactId>
|
|
<version>1.6.4-SNAPSHOT</version>
|
|
</dependency>
|
|
```
|
|
|
|
Add the registry as a repository (and matching server credentials in `settings.xml`) to resolve it.
|
|
|
|
## Support
|
|
|
|
Discord: zLavra
|
|
|
|
## License
|
|
|
|
GPL-3.0 — see [LICENSE](LICENSE).
|