I am searching a plugin that works like the MineZ one. Not like "Loot" or any other. I want it so all chests in a world refills with random things typed into an config. Does anyone know one like that? Or can anyone make one ?
erm, it's against the forum rules to offer money as far as i know... I don't know of any plugin that does what you're asking for.. but I use TreasureChests, it's really easy to set up.
If any dev wants to do this here is a little help (works but is a little bit of a mess ) Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler Code:java package me.mncat77.mnlootchests; import java.util.HashMap;import java.util.Map;import java.util.Random;import net.minecraft.server.NBTTagCompound;import net.minecraft.server.NBTTagList;import net.minecraft.server.NBTTagString;import org.bukkit.Bukkit;import org.bukkit.Location;import org.bukkit.Material;import org.bukkit.block.Block;import org.bukkit.block.BrewingStand;import org.bukkit.block.Chest;import org.bukkit.block.Dispenser;import org.bukkit.block.Furnace;import org.bukkit.command.Command;import org.bukkit.command.CommandSender;import org.bukkit.craftbukkit.inventory.CraftItemStack;import org.bukkit.enchantments.Enchantment;import org.bukkit.plugin.java.JavaPlugin; public class MnLootChests extends JavaPlugin{ public Map<String, String> ChestItemArg = new HashMap<String, String>(); @Overridepublic void onDisable() { } @Overridepublic void onEnable() { loadConfig();int regenerateChestsTaskID = this.getServer().getScheduler().scheduleAsyncRepeatingTask(this, new Runnable(){ public void run(){ int ChestCount = Integer.parseInt(getConfig().getString("ChestCount"));for(int i=1; i <= ChestCount; i++){ String locs = (String)getConfig().get("Chest" + i + ".Coordinates");String[] loc = locs.split(",");Location location = new Location(Bukkit.getWorld("world"),Double.parseDouble(loc[0]),Double.parseDouble(loc[1]),Double.parseDouble(loc[2])); boolean regenChest = true; for(int j=0; (j+1) <= Bukkit.getOnlinePlayers().length; j++){if(Bukkit.getOnlinePlayers()[j].getLocation().distance(location) < 53){regenChest = false;break;}}if(regenChest){int ChestType = getConfig().getInt("Chest" + i + ".ChestType");int Face = getConfig().getInt("Chest" + i + ".Face");Block block = location.getBlock();if(block.getTypeId() == 54){Chest chest = (Chest)location.getBlock().getState();chest.getBlockInventory().clear();}else if(block.getTypeId() == 61){Furnace furnace = (Furnace)location.getBlock().getState();furnace.getInventory().clear();}else if(block.getTypeId() == 117){BrewingStand brewingstand = (BrewingStand)location.getBlock().getState();brewingstand.getInventory().clear();}else if(block.getTypeId() == 23){Dispenser dispenser = (Dispenser)location.getBlock().getState();dispenser.getInventory().clear();}block.setType(Material.AIR);block.setType(Material.CHEST);block.setData((byte)Face);Chest chest = (Chest)location.getBlock().getState();CraftItemStack[] items = randomizeChest(ChestType);chest.getBlockInventory().setContents(items);}}} }, 20L, 1200L); int fillFurnacesTaskID = this.getServer().getScheduler().scheduleAsyncRepeatingTask(this, new Runnable(){ public void run(){ int FurnaceCount = Integer.parseInt(getConfig().getString("FurnaceCount"));for(int i=1; i <= FurnaceCount; i++){ String locs = (String)getConfig().get("Furnace" + i + ".Coordinates");String[] loc = locs.split(",");Location location = new Location(Bukkit.getWorld("world"),Double.parseDouble(loc[0]),Double.parseDouble(loc[1]),Double.parseDouble(loc[2])); boolean fillFurnace = true; for(int j=0; (j+1) <= Bukkit.getOnlinePlayers().length; j++){if(Bukkit.getOnlinePlayers()[j].getLocation().distance(location) < 53){fillFurnace = false;break;}}if(fillFurnace){Block block = location.getBlock();if(block.getTypeId() == 54){Chest chest = (Chest)location.getBlock().getState();chest.getBlockInventory().clear();}else if(block.getTypeId() == 61){Furnace furnace = (Furnace)location.getBlock().getState();furnace.getInventory().clear();}else if(block.getTypeId() == 117){BrewingStand brewingstand = (BrewingStand)location.getBlock().getState();brewingstand.getInventory().clear();}else if(block.getTypeId() == 23){Dispenser dispenser = (Dispenser)location.getBlock().getState();dispenser.getInventory().clear();}int Face = getConfig().getInt("Furnace" + i + ".Face");block.setType(Material.AIR);block.setType(Material.FURNACE);block.setData((byte)Face);Furnace furnace = (Furnace)location.getBlock().getState();CraftItemStack fuel = randomizeFurnace();furnace.getInventory().setFuel(fuel);}}} }, 20L, 1200L);} @Overridepublic boolean onCommand(CommandSender sender, Command command, String label, String[] args) { if(command.getName().equalsIgnoreCase("chest")){ String locs = (String)this.getConfig().get("Chest" + 1 + ".Coordinates");String[] loc = locs.split(",");Location location = new Location(Bukkit.getWorld("world"),Double.parseDouble(loc[0]),Double.parseDouble(loc[1]),Double.parseDouble(loc[2]));Block block = location.getBlock();if(block.getTypeId() == 54){Chest chest = (Chest)location.getBlock().getState();chest.getBlockInventory().clear();}else if(block.getTypeId() == 61){Furnace furnace = (Furnace)location.getBlock().getState();furnace.getInventory().clear();}else if(block.getTypeId() == 117){BrewingStand brewingstand = (BrewingStand)location.getBlock().getState();brewingstand.getInventory().clear();}else if(block.getTypeId() == 23){Dispenser dispenser = (Dispenser)location.getBlock().getState();dispenser.getInventory().clear();}block.setType(Material.AIR);block.setType(Material.CHEST);Chest chest = (Chest)location.getBlock().getState();CraftItemStack[] items = randomizeChest(1);chest.getBlockInventory().setContents(items);//chest.getBlockInventory().addItem(getItemStack(303, 1, "Flak Vest", "This will protect you from skeleton.§kasd", Enchantment.PROTECTION_PROJECTILE, 4));} return true; } private CraftItemStack getItemStack(int ItemID, int durability, int count, String name, String lore, Enchantment ench, int enchLvl){ CraftItemStack item = new CraftItemStack(ItemID, count); if(!name.isEmpty() && lore.isEmpty()){NBTTagCompound tag = new NBTTagCompound();NBTTagCompound display = new NBTTagCompound();tag.setCompound("display", display);display.setString("Name", name);item.getHandle().tag = tag;} if(!lore.isEmpty() && !name.isEmpty()){NBTTagCompound tag = new NBTTagCompound();NBTTagCompound display = new NBTTagCompound();tag.setCompound("display", display);NBTTagList list = new NBTTagList();list.add(new NBTTagString("", lore));display.set("Lore", list);item.getHandle().tag = tag;} if(!(name.isEmpty() && lore.isEmpty())){NBTTagCompound tag = new NBTTagCompound();NBTTagCompound display = new NBTTagCompound();tag.setCompound("display", display);display.setString("Name", name);NBTTagList list = new NBTTagList();list.add(new NBTTagString("", lore));display.set("Lore", list);item.getHandle().tag = tag; } if((ench != null) && (enchLvl != 0)){item.addUnsafeEnchantment(ench, enchLvl);}item.setDurability((short)durability); return item;} private void loadConfig(){ int ChestTypesCount = Integer.parseInt(this.getConfig().getString("ChestTypesCount"));for(int i=1; i<=ChestTypesCount; i++){int ItemsCount = Integer.parseInt(this.getConfig().getString("ChestType" + i + ".ItemsCount"));for(int j=1; j<=ItemsCount; j++){String args = this.getConfig().getString("ChestType" + i + ".Item" + j);String[] split = args.split(";");for(int k=0; k < split.length; k++){String a = split[k];ChestItemArg.put(i + "," + j + "," + (k+1), a);}}} } private CraftItemStack[] randomizeChest(int n){int im = 0;int ItemsCount = Integer.parseInt(this.getConfig().getString("ChestType" + n + ".ItemsCount"));CraftItemStack[] items = new CraftItemStack[27];Random randomGenerator = new Random();do{for(int i=1;i<=ItemsCount;i++){int s = randomGenerator.nextInt(26);int random = randomGenerator.nextInt(100)+1;if((Integer.parseInt(ChestItemArg.get(n + "," + i + "," + 8))) >= random){items[S] = getItemStack(Integer.parseInt(ChestItemArg.get(n + "," + i + "," + 1)), Integer.parseInt(ChestItemArg.get(n + "," + i + "," + 2)), Integer.parseInt(ChestItemArg.get(n + "," + i + "," + 3)),ChestItemArg.get(n + "," + i + "," + 4),ChestItemArg.get(n + "," + i + "," + 5), Enchantment.getByName(ChestItemArg.get(n + "," + i + "," + 6)), Integer.parseInt(ChestItemArg.get(n + "," + i + "," + 7)));[/S][S] im++;[/S][S] }[/S][S] }}while(im==0);[/S] [S] return items;[/S][S] }[/S] [S] private CraftItemStack randomizeFurnace(){[/S][S] CraftItemStack fuel;[/S][S] Random randomGenerator = new Random();[/S][S] int random = randomGenerator.nextInt(6);[/S][S] switch(random){[/S][S] case 0:[/S][S] fuel = new CraftItemStack(263,randomGenerator.nextInt(3)+1);[/S][S] break;[/S][S] case 1:[/S][S] fuel = new CraftItemStack(263,randomGenerator.nextInt(3)+1,(short)1);[/S][S] break;[/S][S] case 2:[/S][S] fuel = new CraftItemStack(280,randomGenerator.nextInt(1)+1);[/S][S] break;[/S][S] case 3:[/S][S] fuel = new CraftItemStack(17,randomGenerator.nextInt(2)+1,(short)randomGenerator.nextInt(3));[/S][S] break;[/S][S] case 4:[/S][S] fuel = new CraftItemStack(5,randomGenerator.nextInt(2)+1,(short)randomGenerator.nextInt(3));[/S][S] break;[/S][S] default:[/S][S] fuel = new CraftItemStack(0);[/S][S] }[/S][S] return fuel;[/S][S] }[/S] [S]}[/S] [S][/S] Config would look like this: Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler FurnaceCount: 2 Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler Furnace1: Coordinates: 73,64,193 Face: 0 Furnace2: Coordinates: 78,64,204 Face: 2 ChestTypesCount: 1 ChestType1: ItemsCount: 5 Item1: 303;5;1;Flak Vest;This will protect you from skeleton.§kasd;PROTECTION_PROJECTILE;4;20 Item2: 57;1;2;DIAMONDBLOCKS!!!;You will never get this...;ARROW_DAMAGE;0;5 Item3: 309;90;1;Heavy Booties;;ARROW_DAMAGE;0;30 Item4: 34;1;1;Wooden Shield;;ARROW_DAMAGE;0;25 Item5: 294;20;1;Wand;;DAMAGE_ALL;30;15 ChestCount: 2 Chest1: Coordinates: 100,64,201 ChestType: 1 Face: 0 Chest2: ChestType: 1 Coordinates: 84,64,217 Face: 0 Edit: Why are the words stroke? lol... ... Why are there three spoilers now.. What is going on...
Don't bump more than once. And, use ChestRestock. Also change the monetary offer. Why do you ignore all the warnings?