@EventHandler(priority = EventPriority.HIGHEST)
	public void onGeneration(ChunkPopulateEvent event){
		if (config.getBoolean("Options.allowCustomDungeonLoot") == true){
			BlockState[] tileEnts = event.getChunk().getTileEntities();
			for (BlockState state : tileEnts) {
				if (state.getType() != Material.CHEST){
					continue;
				}else{
					Chest chest = (Chest) state;
					Inventory cInv = chest.getInventory();
					String[] probability = readTable(dungeonDatas.getString("probability"));
					String[] loot = readTable(dungeonDatas.getString("loot"));
					if (probability[0] != "0" && loot[0] != "none"){
						if (probability.length == loot.length){
							for (int i = 0; i < loot.length; i++){
								double lootChance = Math.random();
								double chance = (Double.parseDouble(probability[i].replace("‘", "").replace("’", "")) / 100);
								if (lootChance <= chance){
									Material lookup = Material.getMaterial(loot[i].toUpperCase().replace("‘", "").replace("’", ""));
									if (lookup != null){
										ItemStack dLoot = new ItemStack(lookup);//TODO add checks
										cInv.addItem(dLoot);
									}else{
										Bukkit.getLogger().info("Error: Material '"+loot[i]+"' does not exist, please make sure it's a valid material");
									}
								}
							}
						}else {
							Bukkit.getLogger().info("Error: Custom dungeon loot configuration is invalid");
						}
					}
				}
			}
		}
	}