![]() clear minecraft:stone_sword If /data only works on the Java Edition (I don't know, I don't use PE or Bedrock), really this should be a request to bring /data to the other versions in my opinion, rather than adding a new command. To remove an item from a player, you can use the /clear command. If you want people to not drop their inventory on the ground, but still start with a blank inventory when respawning, then you might want to look into the Minecraft command line. If you want the winner to not be able to simply loot the deat, put 'keep inventory' on. To give a player an item, you can use the /give command. If you want the 'dead' to lose their items. This command enables the 'keep Inventory' game rule, which prevents players from losing their inventory items when they die. Enter the command: Type the following command into the chat/command window and press Enter: /gamerule keepInventory true. (Says hi only if the player has the selected item somewhere in their inventory) On mobile, the chat button is located in the top center area of the screen. I dont think anyone else really plays with this setting on, but. Ill get all my diamond stuff back in time, but it was pretty annoying to learn that thats how it works for some reason. If you want to find if a player has an item, you can use the /execute command and test for player NBT: I found out the hard way that for some reason you do not keep your inventory in the nether, even with keepInventory on. Ive been trying to use the keepInventory cheat in Minecraft but it always says 'Unknown Command' and no options come up when I put in /gamerules (all that comes up is /gamemode). (Where Inventory is an NBT property, 0 is the first item in the inventory array, and id is an NBT property within the item object in the inventory array) ![]() To get the name of an item in a player's inventory, you can use the index of the inventory (starting from zero), followed by a dot operator and the name of the NBT property (what I mean by NBT property will make sense if you use the command I gave above to look at your inventory), like this: As MukiTanuki said, you can get any player's entire inventory using:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |