first commit

This commit is contained in:
Lars Behrends
2025-12-28 22:15:00 +01:00
commit 160b1dc341
22 changed files with 1026 additions and 0 deletions

92
README.md Normal file
View File

@@ -0,0 +1,92 @@
# Projectvollidioten
A Minecraft Fabric mod that logs player data on join and leave events to an external API.
## Features
- Logs player join and leave events
- Captures detailed player statistics including:
- Health and max health
- Hunger level
- Experience level
- Game mode
- Position (X, Y, Z, Dimension)
- Tracks completed advancements with display names
- Asynchronous API communication to prevent server lag
- Pretty-printed JSON logging for debugging
## Requirements
- Minecraft 1.21.11
- Fabric Loader 0.18.3
- Fabric API 0.140.2+1.21.11
## Installation
1. Download the mod JAR file from the releases page
2. Place the JAR file in your server's `mods` folder
3. Ensure the Fabric API is also installed
4. Start your Minecraft server
## Configuration
The mod sends data to a hardcoded API endpoint: `http://localhost:3000/api/data`
To change the API endpoint, modify the `API_URL` constant in `PlayerDataLogger.java`.
## API Format
The mod sends POST requests with JSON payloads in the following format:
```json
{
"eventType": "JOIN" | "LEAVE",
"player": "PlayerName",
"uuid": "player-uuid-string",
"timestamp": 1234567890123,
"stats": {
"health": 20.0,
"maxHealth": 20.0,
"foodLevel": 20,
"xpLevel": 10,
"gameMode": "survival",
"position": {
"x": 100.5,
"y": 64.0,
"z": -200.3,
"dimension": "minecraft:overworld"
}
},
"advancements": [
{
"id": "minecraft:story/root",
"title": "Minecraft"
}
]
}
```
## Building from Source
1. Clone the repository
2. Run `./gradlew build`
3. The built JAR will be in `build/libs/`
## Development
This mod uses:
- Fabric Loom for building
- Gson for JSON serialization
- Java 21
## License
This project is licensed under the MIT License - see the LICENSE file for details.
## Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Test thoroughly
5. Submit a pull request