Vein Miner
ATTENTION:
New releases for VeinMiner will no longer be made on BukkitDev. See instead the SpigotMC resource page for new releases.
New releases for VeinMiner will no longer be made on BukkitDev. See instead the SpigotMC resource page for new releases.

If you have ever used the Minecraft Forge mod, VeinMiner, this plugin aims to recreate exactly that in an efficient, flexible and feature-filled way. Anything you've ever seen from the VeinMiner mod should be in the VeinMiner plugin, of course with a few minor feature changes due to the limitations of server modifications. If you have not yet used the VeinMiner mod... play more mod packs.
VeinMiner allows players to mine an entire vein of ores whilst sneaking and breaking an ore. It will break the entire vein when only needing to break one ore. Much like the original mod, there is an extremely powerful block list which can be modified in-game, as well as in the configuration file, to determine which blocks (and which data values) are capable of being vein mined. The lists are separated by tools and can be grouped by aliases to allow for a more flexible and simplistic mining experience. This is a fantastic perk for Prison, Factions and Semi-Vanilla servers that isn't overpowered, but still gives players a rewarding benefit for donating to your server.
DISCLAIMER: I am in no way related to or in collaboration with the Minecraft Forge VeinMiner project, or the creator portablejim. This is simply a recreation of a popular mod to be enjoyed on CraftBukkit / Spigot servers.

Commands for VeinMiner are lacking in features, but they can be useful for configuring most of the resource without having to open the configuration file, and they accomplish their purpose.
/veinminer [alias: "/vm"]:
Description: The central command for VeinMiner that controls various aspects of the resource including block list manipulation, tool toggle, and basic informationSub-commands:<reload> - Reload the plugin's configuration file and load everything back into memoryExample:<version> - Retrieve version information of the VeinMiner currently installed on your server<blocklist> <*tool> - Tools are the same as those listed in the configuration file<toggle> [tool] - Toggle vein miner on or off for all (or specific) tools<add> <id> [data] - Add a block to the tools block list (data is optional)<remove> <id> [data] - Remove a block from the tools block list (data is optional)<list> - List all blocks currently on this tools block list<pattern> <namespace:key> - Set the pattern to be used while vein mining- /veinminer blocklist pickaxe add stone- /veinminer blocklist shovel remove dirt 1- /veinminer toggle axe- /veinminer pattern veinminer:default[/SIZE]

veinminer.veinmine.*:
Description: Allow the ability to use VeinMiner for all toolsDefault: All players have this permission by defaultChildren:veinminer.veinmine.pickaxe: Allow the ability to use VeinMiner for pickaxesveinminer.veinmine.axe: Allow the ability to use VeinMiner for axesveinminer.veinmine.shovel: Allow the ability to use VeinMiner for shovelsveinminer.veinmine.shears: Allow the ability to use VeinMiner for shearsveinminer.veinmine.hoe: Allow the ability to use VeinMiner for hoesveinminer.veinmine.hand: Allow the ability to use VeinMiner for materials in the hand category
veinminer.blocklist.*:
Description: Allow access to the "/veinminer blocklist" sub-command, and all of its sub-commands, "add", "remove" and "list"Default: Operators have this permission by defaultChildren:veinminer.blocklist.add: Allow access to the "/veinminer blocklist add" sub-commandveinminer.blocklist.remove: Allow access to the "/veinminer blocklist remove" sub-commandveinminer.blocklist.list: Allow access to the "/veinminer blocklist list" sub-command
veinminer.reload:
Description: Allow access to the "/veinminer reload" sub-commandDefault: Operators have this permission by default
veinminer.toggle:
Description: Allow access to the "/veinminer toggle" sub-commandDefault: All players have this permission by default
veinminer.pattern:
Description: Allow access to the "/veinminer pattern" sub-commandDefault: All players have this permission by default

MetricsEnabled: true ActivationMode: 'SNEAK' RepairFriendlyVeinminer: false IncludeEdges: true DisabledWorlds: - WorldName Tools: Pickaxe: MaxVeinSize: 64 Axe: MaxVeinSize: 64 Shovel: MaxVeinSize: 64 Hoe: MaxVeinSize: 64 Shears: MaxVeinSize: 64 Hand: InheritMaterialsFromAll: false BlockList: Pickaxe: - 'minecraft:coal_ore' - 'minecraft:iron_ore' - 'minecraft:gold_ore' - 'minecraft:lapis_ore' - 'minecraft:redstone_ore' - 'minecraft:diamond_ore' - 'minecraft:emerald_ore' - 'minecraft:nether_quartz_ore' Axe: - 'minecraft:acacia_log' - 'minecraft:birch_log' - 'minecraft:dark_oak_log' - 'minecraft:jungle_log' - 'minecraft:oak_log' - 'minecraft:spruce_log' - 'minecraft:acacia_wood' - 'minecraft:birch_wood' - 'minecraft:dark_oak_wood' - 'minecraft:jungle_wood' - 'minecraft:oak_wood' - 'minecraft:spruce_wood' - 'minecraft:melon' - 'minecraft:pumpkin' - 'minecraft:carved_pumpkin' - 'minecraft:red_mushroom_block' - 'minecraft:brown_mushroom_block' Shovel: - 'minecraft:sand' - 'minecraft:gravel' Hoe: - 'minecraft:wheat[age=7]' - 'minecraft:potatoes[age=7]' - 'minecraft:carrots[age=7]' - 'minecraft:beetroots[age=3]' - 'minecraft:red_mushroom' - 'minecraft:brown_mushroom' Shears: - 'minecraft:black_wool' - 'minecraft:blue_wool' - 'minecraft:brown_wool' - 'minecraft:cyan_wool' - 'minecraft:gray_wool' - 'minecraft:green_wool' - 'minecraft:light_blue_wool' - 'minecraft:light_gray_wool' - 'minecraft:lime_wool' - 'minecraft:magenta_wool' - 'minecraft:orange_wool' - 'minecraft:pink_wool' - 'minecraft:purple_wool' - 'minecraft:red_wool' - 'minecraft:white_wool' - 'minecraft:yellow_wool' - 'minecraft:acacia_leaves' - 'minecraft:birch_leaves' - 'minecraft:dark_oak_leaves' - 'minecraft:jungle_leaves' - 'minecraft:oak_leaves' - 'minecraft:spruce_leaves' - 'minecraft:cobweb' Hand: [] All: - 'minecraft:ice' - 'minecraft:packed_ice' - 'minecraft:blue_ice' Aliases: - 'minecraft:red_mushroom_block,minecraft:brown_mushroom_block' - 'minecraft:grass,minecraft:tall_grass' - 'minecraft:pumpkin,minecraft:carved_pumpkin' - 'minecraft:acacia_log,minecraft:acacia_wood' - 'minecraft:birch_log,minecraft:birch_wood' - 'minecraft:dark_oak_log,minecraft:dark_oak_wood' - 'minecraft:jungle_log,minecraft:jungle_wood' - 'minecraft:oak_log,minecraft:oak_wood' - 'minecraft:spruce_log,minecraft:spruce_wood'

The API for VeinMiner has been constantly changing during its development, but it's now reached a state where it should remain relatively stable. There are various aspects of the API that can be manipulated by an external plugin, and if you're interested in doing so, you are welcome to check out the numerous pages on the Spigot Wiki that can be found by clicking the respective topic below:
[TODO] Listening for when players vein mining
[TODO] Manipulating blocklists / player capabilities
[TODO] Registering custom material aliases
For those of you that like to explore projects on your own and see what you can do, VeinMiner is completely documented and filled with detailed information over every single class, method and constant. There are Javadocs hosted on my website for you to browse, and you can find them here: https://choco.gg/javadocs/veinminer/

VeinMiner has been happily open sourced for a long time and is ready to be contributed to! If you are a VeinMiner API user or if you are simply interested in the code that goes behind the inner-workings of this plugin, its source code is available on GitHub for you to browse and hack away at. You can find the source code by going to VeinMiner's public repository. If you are familiar with Git, you are free to clone, fork or make a pull request to VeinMiner. If I approve of any changes you decide to pull request, I may consider merging the changes into the main branch and uploading a version with your code. You will be credited in the very next changelog, as well as a link to your PR.

This resource is brought to you free of charge without any obligation to pay anything! I love to provide free resources such that people are enjoying it on their servers. Unfortunately, not everything in life is free and I will eventually need some monetary support of some kind. If you enjoy this project and what it provides to your server, please do consider donating as a little thank you for my hard work. I spent countless hours working on this project and all of it is provided without asking for anything.
Donating is not a requirement, and I do not expect anyone to donate. If you so chose to donate out of your own good will, I greatly appreciate the support, and I hope that you enjoy this resource as much as I do developing it! Thank you!
@KremiczeKk
This is something I excluded on purpose in a recent update. I am capable of adding a configuration option for this if you'd like :) "IncludeEdges" wouldn't be hard to implement. If you really want me to do it, I'd be happy to ^-^
"IncludeEdges" would be an excellent addition for dealing with acacia farms and some aspects of large branching oak trees, add me to the list who would appreciate this feature :) Overall great plugin. Thanks for bringing this feature over to Bukkit
:D You're welcome! This is one of my most favourite plugins to work on. I'm working on that update right now! I had some delays on working on this feature simply due to school. After a week, I think it's something I should add in real fast
On top of that, I want to further improve the default version implementation of VeinMiner to allow for more functionality if a version is not fully supported. So we'll see how long that takes! ~\_(''3)_/~ Who knows
EDIT: I've actually finished that update. Both features have been implemented. I want to release it tonight, but we'll see. I wanted to change a few more things as well
Damn, you work quick! I'll keep an eye out for the update!
Thanks again
Idk if it's an issue or not but your Veinminer does not break the same blocks if they touch each other by edges. Only side-connected block break together. This feature is in mod-Veinminer so it'd be great if you would add this too.
P.S.: I'm just pointing out things that your plugin misses from the mod - but you are still doing great work!
EDIT: Wood logs don't break together if they are faced another direction from each other.
I quickly (over a course of 7 days, minus some days off) whipped up my own version called QuickMiner.
Take a look at my vein finding algorithm: DefaultMinerAlgorithm.java. It internally uses another class DomeFillAlgorithm.java
It's also interesting to look at the config if you feel like it.
@youtakun
I'm going to start off by saying that a lot of these issues were not brought to my attention until now. However, there are a few of these that I've noticed yet not had any good way to fix them. I'll address each one in order that you have listed to me:
Thank you for bringing light to these issues. I will tend to them at this very moment, and I'll try to prepare a build by this weekend at the latest. I appreciate the feedback, as well as the interest in the plugin.
There are some serious issues with this plugin preventing me from adding it to my survival server.
And some non-preventing issues:
e.g. (M are mined, X are not. P is player mining the block to the right)
@mat41997
I'm sorry, what? Why are you asking me a question about Skript? I never really encourage the usage of Skript as its basic, limiting, inefficient, and Java will always be better. However, if you're having an issue with a Skript, post your issue on the SpigotMC Skript subforum
https://www.spigotmc.org/forums/skript.90/
plugin not work on skript
@MCGamer199
Source code is available
https://bitbucket.org/2008Choco/veinminer/src/1392e24db57a68e58cfed62c346e2a50761ae919/src/me/choco/veinminer/utils/versions/v1_10/VersionBreaker1_10_R1.java?at=master&fileviewer=file-view-default#VersionBreaker1_10_R1.java-15
@2008Choco
What NMS did you use?
My Infinite Inventory plugin uses NMS and it works on 1.8,1.9 and 1.10 servers.
@MCGamer199
The problem with that is I don't manage the drops. The drops and their drop locations are managed by NMS code as of VeinMiner version 1.9.1
@2008Choco Do something like:
@NosmaStew
I've had this in previous versions, but unfortunately in order to do this there has to be a whole lot of other features. I have to essentially forcibly break the block and take into consideration of fortune, silk touch, and all that annoying stuff. Using NMS just doesn't allow me to do that anymore, which is rather unfortunate :(
@TimDaMiner
Thank you very much! I'm glad to know you stuck through with the development of this plugin! It's been fluctuating in features throughout its development, but it's finally mature :D I will definitely add your server to the list! ^-^ Thank you just as much for using it
A must need plugin for any server! Had this plugin since I went from a friends only server to a public server! 10/10 Also if you want to check out my small little server - RicerCraft.mcraft.pro it's still new. It would be cool if you added it in the description. Here's my website for it - https://sites.google.com/site/ricercraft/ Thank You!
This is really nice Choco! i would love to know something because i don't have the time to test it yet. I have an idea if you don't have it yet. Try when someone is mining an ore or something to add the items on the player inventory or drag them on player location because if there is a lava or a cave (Falling area) and he find diamonds or something and break the ores it might fall in the lava or in the empty area.
Thanks for great plugins:D
@c7w
Then I am more than happy if you repost it in that website. I am familiar with the website as I believe AlchemicalArrows was also listed on that site. I appreciate that you asked my permission and were quite polite about it ^-^ If you use it, I hope you enjoy the plugin!
@2008Choco
I just reposted. 转载 means Reprint The Author of the plugin is you , this will never change The MCBBS is the biggest website for Minecraft in China