# Custom Ore Generator

**Welcome to CustomOreGen! CustomOreGen gives you the ability to customize your SkyBlock server's cobblestone generator!**

![](/media/CustomOreGenerator-Cobble.png) ![](/media/CustomOreGenerator-DiamondOre.png)
# Features
* Different generator presets based on permission nodes and/or island levels
* Compatibile with BentoBox, ASkyBlock, AcidIsland, uSkyBlock, SuperiorSkyblock2, IslandWorld, and PlotSquared
* Configurable spawning rate of any block
* Item Sub IDs are supported
* Open Source: [Source](https://github.com/mastercake10/CustomOreGen) 

# Installation
#### Choose a SkyBlock plugin

In order to run CustomOreGen, one of the following plugins need to be installed to work best. Without a Skyblock plugin, CustomOreGen would use the permission of the closest player mining on the generator.

* BentoBox (by Tastybento) 
* ASkyBlock (by Tastybento)
* AcidIsland (by Tastybento)
* uSkyBlock (by R4zorax)
* Island World (by Gnacik)
* SuperiorSkyblock2 (by Oma_R)
* PlotSquared (by IntellectualSites)
* FabledSkyBlock (by Songoda)

**BentoBox Users** The BentoBox Level Addon is required in order to run CustomOreGen

#### Downloading Custom Ore Generator

1. Download the CustomOreGen plugin [here](https://www.spigotmc.org/resources/customoregen.9532/).
2. Place the CustomOreGen.jar file into your server's plugin folder.
3. Restart your server (Using the /Reload command is not recommended!)

# Creating a Generator
#### Important notices:

* When creating generators, each category should be named "generator1", "generator2", and so on. 

* 1.13/1.14 users: Make sure to use Bukkit material (block) names when putting blocks in a generator category. A list of the Bukkit material names can be found [here](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html).
 
* A generator category must include a 100.0% spawnrate. For example, in the screenshot below, STONE has a 50.0% of being produced, SANDSTONE has a 40.0% chance of being produced, and IRON_ORE has a 10.0% chance of being produced, equaling the 100.0% required (50.0% + 40.0% + 10.0% = 100.0%).

![](/media/CustomOreGenConfig.png)

#### Unlocking Generators using Island Level and Permissions
* When unlocking a generator using permission nodes, the same generator can only be used by all island members if the island owner has the permission. Though, if the island owner goes offline, the default generator in the configuration file will be used.

* When unlocking a generator using island level, the generator will only apply to all island members unless the island owner goes offline. The default generator in the configuration file will be used when the island owner is not online.

![](/media/CustomOreGenUnlock.png)

**Looking for offline owner support? Check out [Advanced Ore Generator](https://www.spigotmc.org/resources/advancedoregen.40527/)!**
# Commands
| Command | Permission | Description |
| -------- | -------- | -------- |
| /CustomOreGen     | CustomOreGen.admin     | Reloads the configuration file     |

# FAQ

Q: Does this plugin need a skyblock plugin?
A: It does not essentially need a skyblock plugin, but you will get the best experience with a skyblock plugin. A skyblock plugin is used to obtain the permssion (or level) of the owner, in order to choose a generator. In a plain vanilla world, there is no way to fetch directly the player permissions mining on the generator. So CustomOreGen will just reuse the permission of the closest player mining on a generator, while ignoring the island level (because there isn't any)

Q: Ores are not generated, why?
A: If you're using Bentobox, verify that the MagicCobblestoneGenerator addon is disabled. If you're not using Bentobox, check if your skyblock plugin has any in-built oregenerators. If so, ask the developer to add an opt-out option.

Q: Can I use both levels and permission?
A: Nope, this is not possible in CustomOreGen.



