# at.atpcraft.player.defs

> Published by [atpcraft.at](https://lexicon.garden/identity/did:plc:6y74tzb6iqeuzuqqxgkizrek)

✓ This is the authoritative definition for this NSID.

## Description

Shared definitions for ATPcraft player data records.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:6y74tzb6iqeuzuqqxgkizrek/at.atpcraft.player.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:6y74tzb6iqeuzuqqxgkizrek/at.atpcraft.player.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:6y74tzb6iqeuzuqqxgkizrek/at.atpcraft.player.defs/examples)

## Definitions

### `at.atpcraft.player.defs#score`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `value` | `integer` | Yes |  |
| `objective` | `string` | Yes | Scoreboard objective name. |

### `at.atpcraft.player.defs#aspect`

**Type**: `object`

One opaque player-data aspect. The payload is always uploaded as a blob; the record holds its reference.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `blob` | `blob` | Yes | Aspect payload uploaded as a blob. |
| `name` | `string` | Yes |  |

### `at.atpcraft.player.defs#summary`

**Type**: `object`

Human-readable, server-signed summary of the player's state at snapshot time. Informative; the authoritative state is the opaque aspect payloads.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `food` | `integer` | Yes | Food level. |
| `team` | `ref` → `#teamSummary` | No |  |
| `health` | `string` | Yes | Current health as a decimal string (the atproto data model has no floats), e.g. "19.5". |
| `scores` | `array` | No | Scoreboard scores, sorted by objective name. |
| `xpLevel` | `integer` | Yes | Experience level. |
| `gameMode` | `string` | Yes | Game mode. |
| `position` | `ref` → `#position` | Yes |  |
| `username` | `string` | Yes | Minecraft username at snapshot time. |
| `dimension` | `string` | Yes | Dimension identifier, e.g. minecraft:overworld. |

### `at.atpcraft.player.defs#position`

**Type**: `object`

Block coordinates (floored; the atproto data model has no floats).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `x` | `integer` | Yes |  |
| `y` | `integer` | Yes |  |
| `z` | `integer` | Yes |  |

### `at.atpcraft.player.defs#teamSummary`

**Type**: `object`

The player's team at snapshot time (informative; plain-text prefix/suffix).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | Team name. |
| `prefix` | `string` | No | Team prefix as plain text. |
| `suffix` | `string` | No | Team suffix as plain text. |

## Raw Schema

```json
{
  "id": "at.atpcraft.player.defs",
  "defs": {
    "score": {
      "type": "object",
      "required": [
        "objective",
        "value"
      ],
      "properties": {
        "value": {
          "type": "integer"
        },
        "objective": {
          "type": "string",
          "maxLength": 256,
          "description": "Scoreboard objective name."
        }
      }
    },
    "aspect": {
      "type": "object",
      "required": [
        "name",
        "blob"
      ],
      "properties": {
        "blob": {
          "type": "blob",
          "accept": [
            "application/octet-stream"
          ],
          "maxSize": 16777216,
          "description": "Aspect payload uploaded as a blob."
        },
        "name": {
          "type": "string",
          "maxLength": 64,
          "knownValues": [
            "core",
            "advancements",
            "stats",
            "ops",
            "scoreboard",
            "team",
            "inventory",
            "ender_chest",
            "equipment",
            "effects",
            "respawn",
            "recipes"
          ]
        }
      },
      "description": "One opaque player-data aspect. The payload is always uploaded as a blob; the record holds its reference."
    },
    "summary": {
      "type": "object",
      "required": [
        "username",
        "dimension",
        "position",
        "health",
        "food",
        "xpLevel",
        "gameMode"
      ],
      "properties": {
        "food": {
          "type": "integer",
          "minimum": 0,
          "description": "Food level."
        },
        "team": {
          "ref": "#teamSummary",
          "type": "ref"
        },
        "health": {
          "type": "string",
          "maxLength": 32,
          "description": "Current health as a decimal string (the atproto data model has no floats), e.g. \"19.5\"."
        },
        "scores": {
          "type": "array",
          "items": {
            "ref": "#score",
            "type": "ref"
          },
          "maxLength": 1024,
          "description": "Scoreboard scores, sorted by objective name."
        },
        "xpLevel": {
          "type": "integer",
          "minimum": 0,
          "description": "Experience level."
        },
        "gameMode": {
          "type": "string",
          "maxLength": 32,
          "description": "Game mode.",
          "knownValues": [
            "survival",
            "creative",
            "adventure",
            "spectator"
          ]
        },
        "position": {
          "ref": "#position",
          "type": "ref"
        },
        "username": {
          "type": "string",
          "maxLength": 64,
          "description": "Minecraft username at snapshot time."
        },
        "dimension": {
          "type": "string",
          "maxLength": 256,
          "description": "Dimension identifier, e.g. minecraft:overworld."
        }
      },
      "description": "Human-readable, server-signed summary of the player's state at snapshot time. Informative; the authoritative state is the opaque aspect payloads."
    },
    "position": {
      "type": "object",
      "required": [
        "x",
        "y",
        "z"
      ],
      "properties": {
        "x": {
          "type": "integer"
        },
        "y": {
          "type": "integer"
        },
        "z": {
          "type": "integer"
        }
      },
      "description": "Block coordinates (floored; the atproto data model has no floats)."
    },
    "teamSummary": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 256,
          "description": "Team name."
        },
        "prefix": {
          "type": "string",
          "maxLength": 256,
          "description": "Team prefix as plain text."
        },
        "suffix": {
          "type": "string",
          "maxLength": 256,
          "description": "Team suffix as plain text."
        }
      },
      "description": "The player's team at snapshot time (informative; plain-text prefix/suffix)."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "description": "Shared definitions for ATPcraft player data records."
}
```
