This is the source code of a Minecraft plugin I made called Ore Regeneration
How it works 1: Create a region using world guard 2: Open config and add the region under Regions: 3: Add the blocks you want that region to generate under blocks: 4: Add the chance of the blocks under chances:
Here is an example
Regions: example: blocks: COAL_ORE,IRON_ORE,GOLD_ORE chances: 60,25,15