Setup a loot table with a gui ingame

Discussion in 'Plugin Development' started by mael_minecraft, Oct 29, 2021.

Thread Status:
Not open for further replies.
  1. Offline


    Hi everyone, I just started java and used to do datapacks before, but now I don't quite understand.
    I want to make a GUI where admin can put custom objects, and they will be put in a reused loot table to put in some chests, but I don't know how to do it, if you have a video that explains this, send or reply to me. And also, can you help me because I don't know how to turn chests near a player that will turn into a loot chest (in my case, apocalypse)

    Thanks to everyone who answers!

    (I'm french btw, if my english isn't good, you know why)
  2. Offline


    Hey, I would make it so that the admin can type in a command, which opens an inventory. When the admin closes that inventory, you loop through all the items in it and save them (e.g. in a config file or an array, etc.). To convert chests into loot chests, you simply check for all chests near a player and get their inventory. You can then work with some random numbers to take random items out of your loot table, as well as filling the chest.

    Hope that helps
Thread Status:
Not open for further replies.

Share This Page