Arqade Asked on January 5, 2021
So, I could only find explanations on how to copy a player’s inventory into a chest, but I’m wondering how I would copy the chest’s contents to the player’s inventory.
Not necessary to read, just some more explanation on what I’m making: I made scoreboards, different scoreboard ranks means access to different doors, etc… I want to make loadouts, so that people with different scoreboard "ranks" (The ranks correspond to different numbers) can basically get a loadout, while others without the "permission" (Score) can’t.
I’ve tried doing it with plugins, but then I forgot that most plugins don’t really allow you to make a command block system that works with it, so that idea failed. I tried a couple of more things, like just dropping it with a dispenser, but then the dispenser would need to be refilled, etc…
So, is there any way I could copy the chest’s contents to a player’s inventory, so that they get the loadout, while still keeping the original chest’s contents
I would have put this in a comment, but apparently I need 50 reputation to comment. Instead of using a chest, you could use loot tables. And if you still need to have a chest with the items, you can just load the loot table into a chest. You can generate a loot table here. For example, to load the "End City Treasure" loot table into a chest, you can use /setblock <X> <Y> <Z> minecraft:chest{LootTable:"chests/end_city_treasure"} replace
. To load the "End City Treasure" loot table into an inventory, use /loot give @p loot minecraft:chests/end_city_treasure
. For more information on loot tables, go here. For more information on the /loot
command, go here
Answered by puff on January 5, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP