NBT Tags for Player in Minecraft (Java Edition 1.14/1.15)
This Minecraft tutorial explains the NBT tags (formerly called data tags) that you can use for a player in Minecraft Java Edition (PC/Mac) 1.14 and 1.15.
TIP: If you are not running Minecraft Java Edition (PC/Mac) 1.14/1.15, find NBT tags for player in another version of Minecraft:
Background
Players have a unique set of NBT tags that can be used in Minecraft commands such as: /data and /scoreboard.
What are NBT tags (formerly called Data Tags)?
NBT tags allow you to set certain properties of a player. The NBT tag is always surrounded in {} such as {Dimension:0}. If there is more than one NBT tag used in a game command, the NBT tags are separated by a comma such as {Dimension:0, foodLevel:20}.
List of NBT Tags
Here is a list of the NBT tags that you can use for a player in Minecraft Java Edition (PC/Mac) 1.14 and 1.15:
NBT Tag | Value (Description) |
---|---|
abilities | data (The abilities that the player has.)
Example |
AbsorptionAmount | number (The number of absorption health points the player has) Example |
DataVersion | version (The version of the player's NBT structure. Each version/snapshot of Minecraft has its own unique version number. Minecraft 1.14.2 has a DataVersion value of 1963) Example |
Dimension | -1 (The player is the Nether) Example |
EnderItems | data (An item in the player's ender chest) Example |
foodLevel | number (The level in the Hunger bar. A full Hunger bar has a value of 20) Example |
foodExhaustionLevel | number (The level of exhaustion) Example |
foodSaturationLevel | number (The current level of saturation) Example |
foodTickTimer | ticks (The value of the Food timer in game ticks) Example |
Health | number (The number of health points the player has) Example |
Inventory | data (An item in the player's inventory) Example |
Invulnerable | 0 (The player will take damage like normal) Example |
playerGameType | 0 (The player is in Survival mode) Example |
PortalCooldown | ticks (The number of game ticks until the player can go through a portal again - there are 20 ticks in a second) Example |
recipeBook | data (A list of the recipes the player knows how to craft) Example |
rootVehicle | data (The entity that the player is currently sitting on) Example |
Score | number (The value that will be displayed as the Score when the player dies) Example |
seenCredits | 0 (The player has not yet gone into the final portal that ends the game and seen the credits) Example |
SelectedItem | data (The item that is currently selected in the hotbar) Example |
SelectedItemSlot | number (The hotbar slot that the player currently has selected. The first slot is 0, second slot is 1, and so on) Example |
ShoulderEntityLeft | data (The entity sitting on the player's left shoulder. Currently, this can only be a parrot) Example |
ShoulderEntityRight | data (The entity sitting on the player's right shoulder. Currently, this can only be a parrot) Example |
SleepingX | number (The X coordinate of where the player is sleeping) Example |
SleepingY | number (The Y coordinate of where the player is sleeping) Example |
SleepingZ | number (The Z coordinate of where the player is sleeping) Example |
SleepTimer | ticks (The number of game ticks that the player has been sleeping in a bed) Example |
SpawnForced | 0 (The player will not spawn if no bed is found) Example |
SpawnX | number (The X coordinate of the player's bed or spawn point) Example |
SpawnY | number (The Y coordinate of the player's bed or spawn point) Example |
SpawnZ | number (The Z coordinate of the player's bed or spawn point) Example |
XpLevel | number (The level on the experience bar) Example |
XpP | number (The percentage on the experience bar until the next level) Example |
XpSeed | number (The seed that will be used for the next enchantment when using an enchanting table) Example |
XpTotal | number (The total XP earned during the current life. This value is displayed as the Score when player dies) Example |
NBT Tag Examples
To get the NBT tags (or data tags) for the nearest player:
/data get entity @p
Next, learn how to use the game commands in Minecraft.
Advertisements