Skip to content

Latest commit

 

History

History
274 lines (238 loc) · 5.97 KB

DATA.md

File metadata and controls

274 lines (238 loc) · 5.97 KB

Web-API Additional Data

The Web-API provides additional data which is not documented on the endpoints because it may or may not be present.

The following documentation tries to list all these properties, they will be present on objects for which it makes sense. The current implementation state of the various data can be found here.

Objects from the /player, /entity, /tile-entity as well as any item stacks (in their data properties) may contain none, one or multiple of these properties.

In the documentation below the "carrier" of a property is often referred to as the 'object', this is done to emphasize the fact that the property can be attached to possibly various different things.

Table of Contents

  1. Achievements
  2. Age
  3. Career
  4. Durability
  5. Dye
  6. Experience
  7. Food
  8. GameMode
  9. Health
  10. Joined
  11. PotionEffects
  12. Sheared
  13. Sign
  14. Spawn
  15. Statistics
  16. Tameable
  17. Trades

Achievements

Contains a list of achievements that have been granted to the object.

"achievements": [
    {
      "id": "mine_wood",
      "name": "Getting Wood",
      "class": "net.minecraft.stats.Achievement",
      "description": "Attack a tree until a block of wood pops out"
    }
]

Age

Contains information about the age of an object.

"age": {
  "adult": false,
  "age": 35,
}

Career

Describes the profession of the object.

"career": "minecraft:priest"

Durability

Describes the durability of an object.

"durability": {
    "unbreakable": false,
    "durability": 1561
}

Dye

The color of an object.

"dye": "white"

Experience

The amount of experience an object has.

"experience": {
    "level": 0,
    "experience": 0,
    "totalExperience": 0
}

Food

The current food levels of an object.

"food": {
    "foodLevel": 20,
    "exhaustion": 3.049999952316284,
    "saturation": 1.0
}

GameMode

The game mode the object is currently in.

"gameMode": "minecraft:creative"

Health

The health information of the object

"health": {
    "current": 20.0,
    "max": 20.0
}

Joined

Information about when the object first/last joined the server.

"joined": {
    "first": 1489329688,
    "last": 1492426023
}

PotionEffects

A list of effects from potions attached to/affecting the object.

"potionEffects": [{
    "type": "minecraft:instant_damage",
    "amplifier": 1,
    "duration": 1
}]

Sheared

True if the object has been sheared, false otherwise.

"sheared": false

Sign

A list of lines of text that are displayed on an object.

"sign": [
    "Hi",
    "How are you?",
    "",
    "Web-API"
 ]

Spawn

Information about which entity is spawned by the object.

"spawn": "minecraft:skeleton_horse"

Statistics

Statistical data about the object.

"statistics": {
    "chest_opened": 2,
    "use_item.minecraft.dispenser": 1,
    "walk_one_cm": 38715,
    "use_item.minecraft.sapling": 1,
    "use_item.minecraft.chest": 2,
    "craft_item.minecraft.planks": 16,
    "leave_game": 34,
    "craft_item.minecraft.crafting_table": 1,
    "dispenser_inspected": 1,
    "use_item.minecraft.dark_oak_stairs": 2,
    "use_item.minecraft.dye": 2,
    "mine_block.minecraft.log": 1,
    "talked_to_villager": 6,
    "pickup.minecraft.log": 62,
    "fly_one_cm": 1351,
    "deaths": 10,
    "jump": 15,
    "play_one_minute": 1107890,
    "fall_one_cm": 20680,
    "use_item.minecraft.planks": 2,
    "sneak_time": 5,
    "use_item.minecraft.spruce_stairs": 5,
    "crouch_one_cm": 31,
    "time_since_death": 485335,
    "pickup.minecraft.sapling": 1,
    "use_item.minecraft.dirt": 11,
    "sprint_one_cm": 1745,
    "use_item.minecraft.stained_glass": 1,
    "use_item.minecraft.sign": 3,
    "use_item.minecraft.red_sandstone_stairs": 2,
    "use_item.minecraft.spawn_egg": 8
}

Tameable

Signifies that an object is tameable and contains information about whether the object is tamed or not and the possible owner.

"tameable": {
    "isTamed": true,
    "owner": {
        "type": "minecraft:player",
        "uuid": "357427c6-3b91-4ead-aad4-15a3e18e6452",
        "location": {
            "world": {
                "name": "world",
                "uuid": "c574ab53-831b-4410-b3ad-955a2a504843",
                "link": "/api/world/c574ab53-831b-4410-b3ad-955a2a504843"
            },
            "position": {
                "x": -2.0039034033218073,
                "y": 4.0,
                "z": -2.026152060791321
            }
        },
        "name": "Valandur",
        "link": "/api/player/357427c6-3b91-4ead-aad4-15a3e18e6452",
        "class": "net.minecraft.entity.player.EntityPlayerMP"
    }
}

Trades

Contains information about the trades the object offers.

"trades": [{
    "hasExpired": false,
    "grantsExp": true,
    "uses": 0,
    "maxUses": 0,
    "firstBuyingItem": {
        "id": "minecraft:rotten_flesh",
        "quantity": 39
    },
    "secondBuyingItem": {
        "id": "minecraft:air",
        "quantity": 0
    },
    "sellingItem": {
        "id": "minecraft:emerald",
        "quantity": 1
    }
}]