Are you asking to make a Minecraft plugin or a plugin that does something with players mining? Because the question can go either way.
To get started with Minecraft plugins, I'd recommend downloading IntelliJ IDEA, which has its own Minecraft Development plugin for you to make your own Minecraft plugins. There are multiple videos on YouTube explaining how to download Java, IntelliJ, and how to get started with making a plugin. It shouldn't be too hard to just google and learn.
There are probably also a lot of tools that you can download to assist with the programming. Not sure how much there is for plugins, but there's a lot of mod creators that have a lot of useful functions.