NOTE: This a custom enchant module require TokenEnchant plugin. 

This plugin contains a custom enchantment effect to give lucky prize when a player mines a block.  Server owners can specify a pool of commands for each lucky level, and one of those commands are randomly selected if the player is lucky while mining with the lucky mining enchantment.

Installation:
Just install TE-LuckyMiningEnchant.jar in TokenEnchant/enchants folder. Then you can either "restart the server" or "reload the plugin (not /te reload)". LuckyMiningEnchantment will automatically be loaded into TokenEnchant framework.

Configuration:

    LuckyMining:
      price: 10
      max: 2    #this number should be same as the highest level in levels: section
      occurrence: always
      effect: MOBSPAWNER_FLAMES
      sound: ENTITY_LIGHTNING_THUNDER  # for pre 1.9 ...AMBIENCE_THUNDER
      levels:
        1:
          chance: 0.10  # 10% chance!
          # '!' -> console, '>' -> op, '@' -> player
          commands:
            - "!tokenenchant add %player% 3;tm msg %player% &aLucky Block! <nl>&\
aYou received 3 tokens!"
            - "!tokenenchant add %player% 1;tm msg %player% &aLucky Block! <nl>&\
aYou received one token!"
            - "!tokenenchant add %player% 5;tm msg %player% &aLucky Block! <nl>&\
aYou received 5 token!"
        2:
          chance: 0.02  # 2% chance!
          commands:
            - "tokenenchant add %player% 10;tm msg %player% &aLucky Block! <nl>\
&aYou received 5 token!"
            - "tokenenchant add %player% 50;tm msg %player% &aLucky Block! <nl>\
&aYou received 5 token!"
      exemptions:  # needs to be Bukkit's Material type in CAPs.
        - GRASS
        - SAND
      # use this option to resolve any conflict with other plugin(s) such as AutoSell
      event_map:
        BlockBreakEvent: "HIGH"
        TEBlockExplodeEvent: "HIGHEST"


Donation:
It would be greatly appreciated for your donation to continue providing support for this plugin.