Files
HeruEdhel be35d92b52
Build Plugin / build (push) Has been cancelled
Build Plugin / release (push) Has been cancelled
Refactor API response descriptors to use resource classes
- Updated response descriptors in various endpoints to utilize specific resource classes instead of generic JsonResponse.
- Changed response types for friendship, guild, party, and support issue endpoints to their respective resource classes.
- Incremented version number in manifest.json to 0.5.3 for the new changes.
2026-06-05 09:23:01 -07:00

151 lines
3.7 KiB
Markdown

# Kweebec Network Core
This repository contains the Hytale plugin-side code for the Kweebec network along with the generated Java view of the control-plane API.
It is not just a generic plugin template anymore. The repo now has two important responsibilities:
- handwritten Hytale plugin and runtime code
- generator-owned Java API packages synced from the sibling `core-control-plane` repository
## Repository purpose
`core-network` is where game-side integrations for the network live.
That includes:
- plugin entry points and handwritten Java glue
- future gameplay-facing integrations that consume the control-plane API
- the generated versioned API tree under `net.kewwbec.network.generated.api.v1`
The generated files are meant to make the control plane feel like a stable Java dependency instead of a pile of raw route strings.
## Generated control-plane SDK tree
The generated Java API output lives under:
```text
src/main/java/net/kewwbec/network/generated/api/v1/
ControlPlaneApiV1.java
shared/
announcements/
assets/
audit/
batch/
configs/
entitlements/
gamepermissions/
gameplay/
health/
hub/
infrastructure/
integrations/
moderation/
players/
plugins/
server/
serviceaccounts/
social/
support/
worlds/
```
What that means:
- each top-level API domain has its own package
- each domain has a `<Domain>Api` entry point
- each route has its own generated `*Endpoint` file
- shared descriptor records live in `shared/`
Example imports look like:
```java
import net.kewwbec.network.generated.api.v1.ControlPlaneApiV1;
import net.kewwbec.network.generated.api.v1.plugins.PluginsApi;
import net.kewwbec.network.generated.api.v1.moderation.CasesShowEndpoint;
```
The handwritten bridge is still:
```text
src/main/java/net/kewwbec/network/network.java
```
Everything under `src/main/java/net/kewwbec/network/generated` is generator-owned and should **not** be edited manually. If they need edits check the generator in the control panel repo
## How generation works
The source of truth for the generated API tree is the `core-control-plane` repository.
Run the sync from that repository:
```bash
php artisan control-plane:sync-network-sdk --dry-run
php artisan control-plane:sync-network-sdk
```
That command exports the Laravel API contract and rewrites the generated Java tree in this repository.
## Common commands
```bash
# Compile Java sources
gradlew.bat compileJava
# Build the plugin jar
gradlew.bat shadowJar
# Build with the standard lifecycle
gradlew.bat build
# Run the Hytale server workflow when local server prerequisites are available
gradlew.bat runServer
```
## Wiki docs
Developer-facing wiki pages live under:
```text
docs/wiki/
```
Start with:
- [Core Network Wiki](docs/wiki/Home.md)
- [Getting Started](docs/wiki/Getting-Started.md)
- [Batched API Calls](docs/wiki/Batched-API-Calls.md)
- [API Response Storage](docs/wiki/API-Response-Storage.md)
- [Control Plane Client](docs/wiki/Control-Plane-Client.md)
- [Generated SDK](docs/wiki/Generated-SDK.md)
## Project structure
```text
core-network/
docs/wiki/
src/main/java/
net/kewwbec/network/
network.java
batch/
cache/
generated/api/v1/...
src/main/resources/
manifest.json
build.gradle
gradle.properties
settings.gradle
```
## Working rules
- Do not patch generated files by hand.
- Fix the control-plane routes or generator, then re-run the sync command.
- Keep handwritten plugin code outside the generated tree.
- Treat the control plane as the API owner; the game-side repo is the consumer.
## Related repositories
- `../core-control-plane` owns the Laravel API and the SDK sync commands.
- `core-network` consumes the generated Java tree and will host the gameplay-facing wrappers around it.