I am making a random chest refill plugin and I have no idea how to generate random items. I want to restrict the random items to weapons, from swords to bows. Yes, almost like RandomItem by @LDX but for chests. What should I do?
I made this plugin a while ago, if I find the code, I will let you know. (I don't mean ChestRefill, I made another private one for randomized refilling.)
Sorry, I haven't, I don't know what I did with it. I probably made it and then deleted it for some reason, stupid me.
Please, feel free. And if you find anything useful in the ChestRefill repo, you are welcome to use it without encumbrance from the MIT license.
Isn't it something like this PHP: foreach($this->getServer()->getLevelByName("survival")->getTiles() as $tiles){ if($tiles instanceof Chest){ //Blah... }}