This is a simple reward plugin, which allows players to receive a pre-defined reward by chance whenever the player take actions (such as fishing, mining, woodcutting and farming).

You can configure to execute any number of commands to give reward and each luck entry has its own execution chance!

You can give permission for each luck defined in the config.yml.

Demo Video:

coming...

How to Install:

copy LuckyReward.jar into the plugins folder.

Configuration:


# +------------------------------------------------------------+ #
# LuckyReward Configuration
# +------------------------------------------------------------+ #

# NOTE: Do NOT put tabs anywhere in the config!

Messages:
  ErrorMsg : "&c[LuckyReward] : Some error occured."
  InvalidRegion: "&c[LuckyReward] : Lucky Reward is not available in this region (&e%region%&c) of the world (&e%world%&c)."

HelpMessages:
  banner:
    msg: "=== &e[&aLuckyReward Commands List (%version%)&e] &r==="  
  help:
    msg: "&a/lr help : displays this help menu."
  reload:
    msg: "&a/lr reload : reloads config file."
    permission: "luckyreward.reload"
  debug:
    msg: "&a/luckyreward debug <true|false> : turn on / off the debug mode."
    permission: "luckyreward.debug"

# this option is introduced from v3.0.0
# this option is for the target outlet of the messages to go. Previously, they were all sent to chat.
MessageOutlet:
  Title: false
  ActionBar: false
  Chat: true

# adjust these event priority if those event processes from this plugin
# interfere with other plugins' event processes.
EventPriorityMap:
  BlockBreakEvent: "NORMAL"
  PlayerFishEvent: "NORMAL"
  TEBlockExplodeEvent: "HIGHEST"

# if this option is specified, explosion from the specified source will be ignored.
# if "*" is specified, all TEBlockExplode will be ignore.
IgnoreTEBlockExplode:
  - "MineBomb"
#  - "Explosive"
#  - "Laser"

# choices of triggering the lucky reward are
# ANY (all types)
# FISHING
# WOODCUTTING
# MINING (mining minirals)
# FARMING (harvesting crops)
# KILLING (killing mobs/players)
LuckyChances:
  Luck1:
    Percentage: 0.25 #this is chance for command to be executed.
    Permission: luckyreward.luck1
    Commands:
      - 'te add %player% 1'
    ExecMessages:
      - "&aYou've given &eXXXX&a!!"
    Outlet: cat  #c : chat, a: actionbar, t : title
    Triggers:
      ANY:
        - "*"

    Invalid:
      world:
        - spawn
      nether_world:
        - pvp

  Luck2:
    Percentage: 0.1 #this is chance for command to be executed.
    Permission: luckyreward.luck2
    Commands:
      - 'te add %player% 1'
    ExecMessages:
      - "&aYou've given &eLuck2a!!"
    Outlet: c  #c : chat, a: actionbar, t : title
    Triggers:
      FISHING:
        - "*"
      WOODCUTTING:
        - LOG
        - LOG_2
      MINING:
        - DIAMOND_ORE
        - IRON_ORE
        - EMERALD_ORE
        - GOLD_ORE
      FARMING:
        - "*"
  Luck3:
    Percentage: 0.02 #this is chance for command to be executed.
    Permission: luckyreward.luck3
    Commands:
      - 'te add %player% 1'
    ExecMessages:
      - "&aYou've given &eLuck Dia!!"
    Outlet: a  #c : chat, a: actionbar, t : title
    Triggers:
      MINING:
        - "*"