{"id":22931,"date":"2026-07-07T18:36:45","date_gmt":"2026-07-07T18:36:45","guid":{"rendered":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/"},"modified":"2026-07-07T18:36:45","modified_gmt":"2026-07-07T18:36:45","slug":"keep-inventory-command-minecraft","status":"publish","type":"post","link":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/","title":{"rendered":"Keep Inventory Command in Minecraft (Keep Items on Death)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Short answer:<\/strong> to keep every item in your inventory and all of your experience when you die in Minecraft Java Edition, run <code>\/gamerule keepInventory true<\/code>. This turns on the built-in <code>keepInventory<\/code> game rule so nothing drops on the ground and no XP is lost on death. Changing it requires operator permission (cheats enabled), and the setting is stored per world.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide covers the exact syntax, copy-paste examples, the op level you need, what the rule does and does not reset, and how Java Edition differs from Bedrock. It is written for Minecraft Java Edition 26.2, where the command is unchanged from earlier versions. If you want to browse and tweak every rule interactively, use our free <a href=\"https:\/\/xgamingserver.com\/tools\/minecraft\/gamerule-browser\">Minecraft Gamerule Browser<\/a> tool.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Syntax<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Keep Inventory is not a standalone command; it is a boolean rule set through the <code>\/gamerule<\/code> command. The general form is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/gamerule <rule name> [value]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For keep-inventory specifically, the rule name is <code>keepInventory<\/code> and the value is <code>true<\/code> or <code>false<\/code>. If you omit the value, the command queries and prints the current setting instead of changing it.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Argument<\/th><th>Required?<\/th><th>Accepted values<\/th><th>What it does<\/th><\/tr><\/thead><tbody><tr><td><code>keepInventory<\/code> (rule name)<\/td><td>Yes<\/td><td>Exact, case-sensitive token<\/td><td>Selects the keep-inventory game rule. Must be typed in camelCase.<\/td><\/tr><tr><td><code>[value]<\/code><\/td><td>No<\/td><td><code>true<\/code> or <code>false<\/code><\/td><td><code>true<\/code> keeps items and XP on death; <code>false<\/code> is the vanilla default (items drop, XP lost). Omit it to query the current value.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Two things to note. First, the name is <strong>case-sensitive<\/strong>: it must be <code>keepInventory<\/code>, not <code>keepinventory<\/code> or <code>Keepinventory<\/code>. Second, the internal registry ID is the snake_case <code>keep_inventory<\/code>, but you must <strong>not<\/strong> type that in chat \u2014 the command-facing name is the camelCase <code>keepInventory<\/code>. Since Java Edition 1.13, <code>\/gamerule<\/code> rejects unknown rule names and type-checks values, so a boolean rule accepts only <code>true<\/code> or <code>false<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Examples<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Open the chat window with the <strong>T<\/strong> key, then type one of the following. Each is copy-paste ready.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Turn keep-inventory ON<\/strong> \u2014 the most common use. Players now respawn with everything they were carrying, plus their XP:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/gamerule keepInventory true<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Turn keep-inventory OFF<\/strong> \u2014 reverts to vanilla behavior, where items drop on the ground and XP is lost on death:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/gamerule keepInventory false<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. Check the current setting<\/strong> \u2014 omit the value and the game prints whether the rule is currently <code>true<\/code> or <code>false<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/gamerule keepInventory<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>4. Run it from a command block<\/strong> \u2014 inside a command block you drop the leading slash:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gamerule keepInventory true<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>5. Run it from a dedicated-server console<\/strong> \u2014 same as the command block, no slash needed. This is how server owners set it globally for a world:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gamerule keepInventory true<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Prefer to set it before you ever spawn? When you create a new world in Java Edition, go to <strong>Create New World \u2192 More \/ Game Rules<\/strong> and toggle <em>Keep inventory after death<\/em> to ON, so the rule is active from the first spawn. (The exact toggle wording can vary slightly by version and language.)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Permissions, op level, and what still resets<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Changing <code>keepInventory<\/code> in an existing world requires <strong>permission level 2<\/strong> \u2014 operator status, or cheats enabled. In single-player that means your world was created with cheats on, or you used <strong>Open to LAN<\/strong> with <em>Allow Cheats: ON<\/em>. On a multiplayer server you need op, or you run it from the server console. Command blocks also run at the required permission level. The default value of the rule is <code>false<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is important to understand exactly what the rule protects. When <code>keepInventory<\/code> is <code>true<\/code>:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Kept:<\/strong> all inventory items and armor, and your accumulated experience (XP). Nothing drops on the ground.<\/li><li><strong>Not affected:<\/strong> <strong>health and hunger are still reset<\/strong> on respawn, and <strong>all active status effects are still removed<\/strong> on death. Keep Inventory only stops item and XP loss.<\/li><li><strong>Curse of Vanishing:<\/strong> while <code>keepInventory<\/code> is <code>true<\/code>, the <a href=\"https:\/\/xgamingserver.com\/blog\/all-minecraft-enchantments-list\/\">Curse of Vanishing<\/a> enchantment does <strong>not<\/strong> trigger \u2014 cursed items stay with you instead of being destroyed.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Game rules are stored <strong>per world<\/strong>. Setting <code>keepInventory<\/code> in one world does not carry it to any other world or save \u2014 you must set it separately in each one. This rule uses no item data components or NBT, so the 1.20.5 <code>\/give<\/code> component-syntax change does not apply here. For the full catalog of rules, see our <a href=\"https:\/\/xgamingserver.com\/blog\/minecraft-gamerules-list\/\">Minecraft gamerules list<\/a>, and for every command in general, the <a href=\"https:\/\/xgamingserver.com\/blog\/minecraft-commands-list\/\">Minecraft commands list<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Java vs Bedrock<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The behavior is the same across editions \u2014 you keep both items and XP on death \u2014 but the way you set it differs.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><\/th><th>Java Edition<\/th><th>Bedrock Edition<\/th><\/tr><\/thead><tbody><tr><td>Command token<\/td><td><code>\/gamerule keepInventory true<\/code> (camelCase, case-sensitive)<\/td><td><code>\/gamerule keepinventory true<\/code> (lowercase)<\/td><\/tr><tr><td>Typical UI toggle<\/td><td>Create New World \u2192 Game Rules \u2192 <em>Keep inventory after death<\/em><\/td><td>World Settings \u2192 Cheats \u2192 <em>Keep Inventory<\/em> switch<\/td><\/tr><tr><td>Requirement<\/td><td>Operator \/ permission level 2 (cheats)<\/td><td>Cheats enabled (host\/operator)<\/td><\/tr><tr><td>Side effect<\/td><td>None on progression<\/td><td>Enabling cheats can disable achievements for that world<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In short: on Java, type <code>keepInventory<\/code> exactly; on Bedrock, use lowercase <code>keepinventory<\/code> or just flip the <em>Keep Inventory<\/em> switch in the world&#8217;s Cheats settings. Bedrock UI wording may vary by build. This article targets the Java Edition 26.2 release cycle.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Does Keep Inventory also save my experience?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. When <code>keepInventory<\/code> is <code>true<\/code> you keep both your items and your XP on death \u2014 no experience is lost. Health and hunger are still reset when you respawn, and status effects are still removed on death.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why does my command say the rule is unknown?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Almost always a capitalization mistake. The name is case-sensitive and must be typed as <code>keepInventory<\/code>. Do not type the internal ID <code>keep_inventory<\/code> in chat, and do not use lowercase <code>keepinventory<\/code> (that is the Bedrock spelling). Since 1.13, Java rejects unknown rule names outright.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why can&#8217;t I run the command at all?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You need permission level 2 (operator \/ cheats). In single-player, cheats must be enabled for the world, or open it to LAN with <em>Allow Cheats: ON<\/em>. On a server, you must be op or run it from the console.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Do I have to set it in every world?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. Game rules are stored per world and do not transfer between saves, so enable <code>keepInventory<\/code> separately in each world \u2014 or toggle it on the Game Rules screen when creating a new world.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I get my items back if I forgot to enable it?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Keep Inventory is not retroactive \u2014 it only affects deaths that happen after you turn it on. If you already died with it off, you can re-obtain gear with the <a href=\"https:\/\/xgamingserver.com\/blog\/minecraft-give-command\/\">\/give command<\/a> (look up the right names in our <a href=\"https:\/\/xgamingserver.com\/blog\/minecraft-item-ids\/\">Minecraft item IDs<\/a> list) or return to your death location using <a href=\"https:\/\/xgamingserver.com\/blog\/minecraft-teleport-commands\/\">teleport commands<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Want a hassle-free world where you control every rule? Spin up a server with <a href=\"https:\/\/xgamingserver.com\/minecraft-server-hosting\">XGamingServer Minecraft server hosting<\/a> and set <code>keepInventory<\/code> straight from the console. For deeper dives, explore our full <a href=\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/\">keep inventory command<\/a> reference and related guides on the <a href=\"https:\/\/xgamingserver.com\/blog\/minecraft-summon-command\/\">\/summon command<\/a> and <a href=\"https:\/\/xgamingserver.com\/blog\/minecraft-target-selectors\/\">target selectors<\/a> \u2014 or jump straight into the <a href=\"https:\/\/xgamingserver.com\/tools\/minecraft\/gamerule-browser\">Minecraft Gamerule Browser<\/a> to configure every rule visually.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Short answer: to keep every item in your inventory and all of your experience when you die in Minecraft Java Edition, run \/gamerule keepInventory true. This turns on the built-in keepInventory game rule so nothing drops on the ground and no XP is lost on death. Changing it requires operator permission (cheats enabled), and the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":22932,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_gspb_post_css":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[19],"tags":[],"class_list":["post-22931","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-minecraft-server-docs"],"blocksy_meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v24.5 (Yoast SEO v26.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Keep Inventory Command in Minecraft (Java)<\/title>\n<meta name=\"description\" content=\"Use \/gamerule keepInventory true to keep all items and XP on death in Minecraft Java 26.2. Full syntax, examples, op level, and Bedrock differences.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Keep Inventory Command in Minecraft (Keep Items on Death)\" \/>\n<meta property=\"og:description\" content=\"Use \/gamerule keepInventory true to keep all items and XP on death in Minecraft Java 26.2. Full syntax, examples, op level, and Bedrock differences.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/\" \/>\n<meta property=\"og:site_name\" content=\"XGamingServer\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/web.facebook.com\/xgamingserver69\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-07T18:36:45+00:00\" \/>\n<meta name=\"author\" content=\"Hectar Carson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@xgamingserver\" \/>\n<meta name=\"twitter:site\" content=\"@xgamingserver\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hectar Carson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/\"},\"author\":{\"name\":\"Hectar Carson\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/#\/schema\/person\/561042c617869348e75abfe16a269f8d\"},\"headline\":\"Keep Inventory Command in Minecraft (Keep Items on Death)\",\"datePublished\":\"2026-07-07T18:36:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/\"},\"wordCount\":1067,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/07\/keep-inventory-command-minecraft.jpg\",\"articleSection\":[\"Minecraft\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/\",\"url\":\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/\",\"name\":\"Keep Inventory Command in Minecraft (Java)\",\"isPartOf\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/07\/keep-inventory-command-minecraft.jpg\",\"datePublished\":\"2026-07-07T18:36:45+00:00\",\"description\":\"Use \/gamerule keepInventory true to keep all items and XP on death in Minecraft Java 26.2. Full syntax, examples, op level, and Bedrock differences.\",\"breadcrumb\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#primaryimage\",\"url\":\"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/07\/keep-inventory-command-minecraft.jpg\",\"contentUrl\":\"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/07\/keep-inventory-command-minecraft.jpg\",\"width\":1366,\"height\":768},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/xgamingserver.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Minecraft\",\"item\":\"https:\/\/xgamingserver.com\/blog\/category\/minecraft-server-docs\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Keep Inventory Command in Minecraft (Keep Items on Death)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/#website\",\"url\":\"https:\/\/xgamingserver.com\/blog\/\",\"name\":\"XGamingServer\",\"description\":\"Dedicated Game Server Hosting\",\"publisher\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/xgamingserver.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/#organization\",\"name\":\"XGamingServer\",\"url\":\"https:\/\/xgamingserver.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2020\/09\/logo.svg\",\"contentUrl\":\"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2020\/09\/logo.svg\",\"width\":\"1024\",\"height\":\"1024\",\"caption\":\"XGamingServer\"},\"image\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/web.facebook.com\/xgamingserver69\/\",\"https:\/\/x.com\/xgamingserver\",\"https:\/\/www.instagram.com\/xgamingserver\/\",\"https:\/\/www.linkedin.com\/company\/xgamingserver\/\",\"https:\/\/www.pinterest.com\/xgamingserver\/\",\"https:\/\/www.youtube.com\/channel\/UCHnOtWxpzaL2r3jM9Jm40EQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/#\/schema\/person\/561042c617869348e75abfe16a269f8d\",\"name\":\"Hectar Carson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1cbcd42dac6c5f21cb52dd64f03fd442250a15f7bb1ade04e23002eb5b384de5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1cbcd42dac6c5f21cb52dd64f03fd442250a15f7bb1ade04e23002eb5b384de5?s=96&d=mm&r=g\",\"caption\":\"Hectar Carson\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Keep Inventory Command in Minecraft (Java)","description":"Use \/gamerule keepInventory true to keep all items and XP on death in Minecraft Java 26.2. Full syntax, examples, op level, and Bedrock differences.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/","og_locale":"en_US","og_type":"article","og_title":"Keep Inventory Command in Minecraft (Keep Items on Death)","og_description":"Use \/gamerule keepInventory true to keep all items and XP on death in Minecraft Java 26.2. Full syntax, examples, op level, and Bedrock differences.","og_url":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/","og_site_name":"XGamingServer","article_publisher":"https:\/\/web.facebook.com\/xgamingserver69\/","article_published_time":"2026-07-07T18:36:45+00:00","author":"Hectar Carson","twitter_card":"summary_large_image","twitter_creator":"@xgamingserver","twitter_site":"@xgamingserver","twitter_misc":{"Written by":"Hectar Carson","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#article","isPartOf":{"@id":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/"},"author":{"name":"Hectar Carson","@id":"https:\/\/xgamingserver.com\/blog\/#\/schema\/person\/561042c617869348e75abfe16a269f8d"},"headline":"Keep Inventory Command in Minecraft (Keep Items on Death)","datePublished":"2026-07-07T18:36:45+00:00","mainEntityOfPage":{"@id":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/"},"wordCount":1067,"commentCount":0,"publisher":{"@id":"https:\/\/xgamingserver.com\/blog\/#organization"},"image":{"@id":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#primaryimage"},"thumbnailUrl":"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/07\/keep-inventory-command-minecraft.jpg","articleSection":["Minecraft"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/","url":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/","name":"Keep Inventory Command in Minecraft (Java)","isPartOf":{"@id":"https:\/\/xgamingserver.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#primaryimage"},"image":{"@id":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#primaryimage"},"thumbnailUrl":"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/07\/keep-inventory-command-minecraft.jpg","datePublished":"2026-07-07T18:36:45+00:00","description":"Use \/gamerule keepInventory true to keep all items and XP on death in Minecraft Java 26.2. Full syntax, examples, op level, and Bedrock differences.","breadcrumb":{"@id":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#primaryimage","url":"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/07\/keep-inventory-command-minecraft.jpg","contentUrl":"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/07\/keep-inventory-command-minecraft.jpg","width":1366,"height":768},{"@type":"BreadcrumbList","@id":"https:\/\/xgamingserver.com\/blog\/keep-inventory-command-minecraft\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/xgamingserver.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Minecraft","item":"https:\/\/xgamingserver.com\/blog\/category\/minecraft-server-docs\/"},{"@type":"ListItem","position":3,"name":"Keep Inventory Command in Minecraft (Keep Items on Death)"}]},{"@type":"WebSite","@id":"https:\/\/xgamingserver.com\/blog\/#website","url":"https:\/\/xgamingserver.com\/blog\/","name":"XGamingServer","description":"Dedicated Game Server Hosting","publisher":{"@id":"https:\/\/xgamingserver.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/xgamingserver.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/xgamingserver.com\/blog\/#organization","name":"XGamingServer","url":"https:\/\/xgamingserver.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/xgamingserver.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2020\/09\/logo.svg","contentUrl":"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2020\/09\/logo.svg","width":"1024","height":"1024","caption":"XGamingServer"},"image":{"@id":"https:\/\/xgamingserver.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/web.facebook.com\/xgamingserver69\/","https:\/\/x.com\/xgamingserver","https:\/\/www.instagram.com\/xgamingserver\/","https:\/\/www.linkedin.com\/company\/xgamingserver\/","https:\/\/www.pinterest.com\/xgamingserver\/","https:\/\/www.youtube.com\/channel\/UCHnOtWxpzaL2r3jM9Jm40EQ"]},{"@type":"Person","@id":"https:\/\/xgamingserver.com\/blog\/#\/schema\/person\/561042c617869348e75abfe16a269f8d","name":"Hectar Carson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/xgamingserver.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1cbcd42dac6c5f21cb52dd64f03fd442250a15f7bb1ade04e23002eb5b384de5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1cbcd42dac6c5f21cb52dd64f03fd442250a15f7bb1ade04e23002eb5b384de5?s=96&d=mm&r=g","caption":"Hectar Carson"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/07\/keep-inventory-command-minecraft.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/posts\/22931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/comments?post=22931"}],"version-history":[{"count":0,"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/posts\/22931\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/media\/22932"}],"wp:attachment":[{"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/media?parent=22931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/categories?post=22931"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/tags?post=22931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}