https://github.com/sukikui/playercoordsapi
A lightweight Fabric mod that exposes your Minecraft player coordinates via a local HTTP API
https://github.com/sukikui/playercoordsapi
api client-side fabric http minecraft-mod
Last synced: 29 days ago
JSON representation
A lightweight Fabric mod that exposes your Minecraft player coordinates via a local HTTP API
- Host: GitHub
- URL: https://github.com/sukikui/playercoordsapi
- Owner: Sukikui
- License: mit
- Created: 2025-02-27T21:28:40.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-01T17:31:09.000Z (about 1 year ago)
- Last Synced: 2025-03-01T18:31:22.233Z (about 1 year ago)
- Topics: api, client-side, fabric, http, minecraft-mod
- Language: Java
- Homepage:
- Size: 84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PlayerCoordsAPI
A lightweight Fabric mod that exposes your Minecraft player coordinates via a local HTTP API.
## 📋 Overview
PlayerCoordsAPI provides real-time access to your Minecraft player coordinates through a simple HTTP endpoint. This enables external applications to track your position without needing to read Minecraft's memory or capture the screen.
## ✨ Features
- Lightweight HTTP server running only on localhost providing your coordinates
- Client-side only - no server-side components needed
- Works in singleplayer and multiplayer
- Mod menu integration allowing you to enable/disable the API
## 🚀 Installation
1. Install [Fabric Loader](https://fabricmc.net/use/)
2. Download the latest `playercoordsapi-x.x.x+mcx.x.x.jar` from the [releases page](https://github.com/Sukikui/PlayerCoordsAPI/releases)
3. Place the jar in your `.minecraft/mods` folder
4. Launch Minecraft with the Fabric profile
## 🔌 API Usage
| Endpoint | Method | Description |
|---------------|--------|----------------------------------------------------------|
| `/api/coords` | `GET` | Returns the player's current coordinates and world infos |
### Response Format
```json
{
"x": 123.45,
"y": 64.00,
"z": -789.12,
"world": "overworld",
"biome": "plains"
}
```
### Response Fields
| Field | Type | Description |
|---------|----------|-----------------|
| `x` | `number` | East-West |
| `y` | `number` | Height |
| `z` | `number` | North-South |
| `world` | `string` | Minecraft world |
| `biome` | `string` | Minecraft biome |
### Error Responses
| Status | Message |
|--------|---------------------|
| `403` | Access denied |
| `404` | Player not in world |
## 🔒 Security
For security reasons, the API server:
- Only accepts connections from localhost `127.0.0.1`
- Runs on port `25565` by default
- Provides read-only access to player position data
## 🛠️ Examples
### cURL
```bash
curl http://localhost:25565/api/coords
```
### Python
```python
import requests
response = requests.get("http://localhost:25565/api/coords")
data = response.json()
print(f"Player at X: {data['x']}, Y: {data['y']}, Z: {data['z']}")
```
### JavaScript
```javascript
fetch("http://localhost:25565/api/coords")
.then(response => response.json())
.then(data => console.log(`Player at X: ${data.x}, Y: ${data.y}, Z: ${data.z}`));
```
Made with ❤️ by
Sukikui