A server-side Fabric mod for Minecraft that broadcasts player location and rotation data via WebSocket in real-time.
- Real-time Location Broadcasting: Sends player coordinates (X, Y, Z) and rotation (pitch, yaw) via WebSocket every server tick
- Multi-player Support: Tracks and broadcasts location data for all players on the server
- Configurable WebSocket Endpoint: Customize the WebSocket server URL and port through a configuration file
- JSON Format: Location data is sent in an easy-to-parse JSON format
- Minecraft 1.21.10
- Fabric Loader 0.18.1 or higher
- Fabric API
- Java 21 or higher
- Install Fabric Loader for Minecraft 1.21.10
- Download and install Fabric API
- Download the latest release of LocationWebSocket from the Releases page
- Place the downloaded JAR file in your Minecraft
modsfolder - Launch Minecraft with the Fabric profile
On first run, the mod creates a configuration file at:
.minecraft/config/LocationWebSocket/config.json
| Option | Default | Description |
|---|---|---|
websocketPort |
8080 |
The port number for the WebSocket connection |
websocketURL |
127.0.0.1 |
The WebSocket server URL/hostname (e.g., localhost or 127.0.0.1) |
enableMod |
true |
Whether the mod is enabled. Set to false to disable without removing the mod |
{
"websocketPort": 8080,
"websocketURL": "localhost",
"enableMod": true
}The mod sends player location data in the following JSON format:
{
"players": [
{
"uuid": "player-uuid-here",
"location": [x, y, z],
"rotation": [pitch, yaw]
}
]
}uuid: The player's unique identifierlocation: Array containing X, Y, Z coordinates as doublesrotation: Array containing pitch and yaw values as doubles
- JDK 21 or higher
- Git
-
Clone the repository:
git clone https://github.com/Pepijn-DB/LocationWebSocket.git cd LocationWebSocket -
Build the project:
./gradlew build
-
The compiled JAR file will be located in
build/libs/
- Live Map Integration: Connect to external mapping applications to display real-time player positions
- Stream Overlays: Create custom overlays showing player coordinates for streaming
- Server Monitoring: Track player movements across your server
- Custom Applications: Build applications that react to player positions in real-time
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.