LuckyEngine Docs

Commands, permissions, reward types, the full config reference, the luck system, and every PlaceholderAPI placeholder.

Getting Started

Build from source with JDK 21+ and Maven 3.8+:

mvn package          # requires JDK 21 + Maven 3.8+

Drop target/LuckyBlock.jar into your server's plugins/ folder and restart. Give yourself a Lucky Block with /lb give <yourname>, place it, break it.

RequirementVersion
Java21+
Paper / Spigot1.21.x
PlaceholderAPIOptional — auto-detected

Installation steps:

  1. Build or download the jar
  2. Drop into plugins/
  3. Restart the server
  4. Edit plugins/LuckyBlock/config.yml to your liking
  5. Edit plugins/LuckyBlock/lang/en_US.yml (or pl_PL.yml) to customise all messages
  6. Run /lb reload — no restart needed for config/lang changes

Commands

Aliases: /luckyblock, /lucky

CommandDescriptionPermission
/lb guiOpen the main GUI menuluckyblock.use
/lb give <player> [amt]Give Lucky Block itemsluckyblock.admin
/lb setluck <player> <n>Set luck to exact value (−100 → +100)luckyblock.admin
/lb addluck <player> <n>Add or subtract luckluckyblock.admin
/lb getluck [player]Check luck value and barluckyblock.use
/lb listList all rewards with tiers and weightsluckyblock.use
/lb reloadReload config.yml and lang filesluckyblock.admin

Permissions

NodeDefaultDescription
luckyblock.useEveryoneBasic commands and GUI browsing
luckyblock.adminOPGive blocks, edit rewards, manage luck, reload

The Lucky Block Visual

No resource pack needed. Uses vanilla Block Display entities:

  • Real block: Yellow Stained Glass — solid, fully breakable by players with any tool
  • Inner core: Sponge Block Display at 0.5× scale, centred inside the glass at offset (0.25, 0.25, 0.25)

When broken, the display entity is removed instantly and the reward fires.

Crafting Recipe

Default (configurable in config.yml under crafting:):

G G G
G S G   →   ✦ Lucky Block
G G G

G = Glass · S = Sponge

Luck System

Every player starts at luck 0. Range: −100 (very unlucky) → +100 (very lucky). Players receive a luck HUD in chat every time they break a block (toggleable in config).

LuckEffect
+100GREAT rewards get 3× weight; BAD rewards shrink to 0.05× weight
0All base weights apply as configured
−100BAD rewards get ~2× weight; GREAT rewards near impossible

In-Game GUI

Open with /lb gui. Three main screens:

Main Menu — Shows your current luck bar. Buttons: Browse Rewards, Create New Reward, Give yourself a Lucky Block, Reload Config.

Reward List — Paginated grid of every loaded reward. Left-click to edit, right-click to instantly delete.

Reward Editor — All reward fields visible at once. Clicking a field either cycles it (Tier) or opens a dedicated sub-GUI:

FieldSub-GUIDescription
TypeType SelectorIcon grid of all 14 reward types with descriptions
EnchantmentsEnchantment EditorFull browser with level +/− per enchant
MobMob Selector36-mob grid + powered/tamed/gear/sky toggles + count
Potion EffectPotion EditorAll 33 effects, click to add/edit duration+amp
CommandsCommand Editor18 command slots, 8 placeholder buttons, 12 templates

Save writes directly to config.yml and reloads — no restart.

Reward Types

TypeKey fieldsNotes
ITEMmaterial, amountOptional: enchantments, custom-name, lore
MULTI_ITEMitems: []Each entry has same fields as ITEM
XPxp-points, xp-levelsDirect API — no Essentials conflict
COMMANDcommands: []Console; %player% replaced with player name
MOB_SPAWNmob, countFlags: powered, tamed, with-gear, drop-from-sky
EXPLOSIONpower, break-blocks
POTION_EFFECTeffects: []Each: effect, duration-seconds, amplifier
LIGHTNINGcount, damageScattered; damage: false = visual only
MESSAGEmessagePrivate to the player only
STRUCTUREstructureOBSIDIAN_CAGE, COBWEB_TRAP, TREASURE_VAULT, ORE_VEIN_DIAMOND
CHEST_LOOTloot-tableAny minecraft:chests/... key
ENCHANT_HELDlevelsRandomly enchants the player's held item
FIREWORKScountColourful random fireworks
TRAPtrapDROP_HOTBAR — scatters hotbar on the ground

Config Reference

language: en_US                  # en_US or pl_PL
lucky-block-material: YELLOW_STAINED_GLASS
suppress-normal-drop: true

# Luck
default-luck: 0
luck-min: -100
luck-max: 100
luck-drift-after-break: 0        # change luck value after each break
luck-reset-on-death: false

# Cooldowns
cooldown-seconds: 0              # 0 = no cooldown
cooldown-message: "..."

# Restrictions
allowed-worlds: []               # empty = all worlds
required-tool: ANY               # e.g. GOLDEN_PICKAXE

# Effects
effects:
  break-particle: TOTEM_OF_UNDYING
  break-sound: ENTITY_PLAYER_LEVELUP
  sound-volume: 1.0
  sound-pitch: 1.0
  particle-count: 60

# HUD
hud:
  enabled: true                  # show luck/tier box in chat on break

# Broadcast
broadcast-rewards: true          # only GREAT + GOOD tiers broadcast

# Crafting
crafting:
  enabled: true
  shape: ["GGG","GSG","GGG"]
  ingredients: { G: GLASS, S: SPONGE }
  result-amount: 1

Adding a Reward via Config

rewards:
  - id: my_god_sword
    tier: GREAT
    type: ITEM
    weight: 2
    display-name: "&5God Sword!"
    material: NETHERITE_SWORD
    amount: 1
    custom-name: "&5✦ Sword of Fortune"
    lore:
      - "&7Blessed by luck itself"
    enchantments:
      - "SHARPNESS:6"
      - "FIRE_ASPECT:3"
      - "UNBREAKING:5"
      - "MENDING:1"

Or use /lb gui → Reward List → Create New Reward for a fully in-game experience.

Localisation

All player-facing text lives in plugins/LuckyBlock/lang/<locale>.yml. Set language: en_US or language: pl_PL in config.yml.

Files are copied from the jar on first start and can be edited freely. Changes apply on /lb reload.

Bundled languages: en_US (English) · pl_PL (Polish)

To add a new language, copy en_US.yml, rename it (e.g. de_DE.yml), translate all values, and set language: de_DE in config.

File Structure

plugins/LuckyBlock/
├── config.yml           ← main configuration
├── luck.yml             ← per-player luck values (auto-generated)
├── lucky_blocks.yml     ← placed lucky block locations (auto-generated)
└── lang/
    ├── en_US.yml        ← English messages
    └── pl_PL.yml        ← Polish messages

PlaceholderAPI

Requires PlaceholderAPI. LuckyEngine registers automatically when PAPI is present — no /papi ecloud download needed.

Luck Placeholders

PlaceholderTypeExampleDescription
%luckyblock_luck%Integer42Raw luck value (−100 to +100)
%luckyblock_luck_formatted%String§a+42Coloured luck number
%luckyblock_luck_bar%String§a■■■■■□□□□□10-segment visual bar
%luckyblock_luck_tier%String§aLuckyHuman-readable tier label

Break Count — Personal

Counts Lucky Blocks broken by this specific player within the given window.

PlaceholderDescription
%luckyblock_breaks_total%All-time total (never resets)
%luckyblock_breaks_hourly%Last 60 minutes
%luckyblock_breaks_daily%Last 24 hours
%luckyblock_breaks_weekly%Last 7 days
%luckyblock_breaks_monthly%Last 30 days

Break Count — Global

Counts Lucky Blocks broken by all players combined within the given window.

PlaceholderDescription
%luckyblock_breaks_global_total%All-time server total
%luckyblock_breaks_global_hourly%All players — last 60 minutes
%luckyblock_breaks_global_daily%All players — last 24 hours
%luckyblock_breaks_global_weekly%All players — last 7 days
%luckyblock_breaks_global_monthly%All players — last 30 days

Misc

PlaceholderDescription
%luckyblock_total_rewards%Number of currently loaded rewards

Implementation Notes

  • Break timestamps are stored in plugins/LuckyEnigne/stats.yml
  • Entries older than 31 days are automatically pruned to keep the file small
  • All-time totals (breaks_total, breaks_global_total) are stored separately and never pruned — they always reflect the true cumulative count
  • Counts are recalculated on each placeholder request by filtering the timestamp list — no scheduled resets needed

Luck Colour Coding

RangeColour
+51 to +100§a Bold Green
+11 to +50§a Green
−10 to +10§e Yellow
−50 to −11§c Red
−100 to −51§4 Bold Dark Red

Luck Tier Labels (en_US)

RangeLabel
+75 to +100Very Lucky
+25 to +74Lucky
−24 to +24Neutral
−74 to −25Unlucky
−100 to −75Very Unlucky

Scoreboard Example

lines:
  - "&6&lLuckyEnigne"
  - "&7Luck: %luckyblock_luck_formatted%"
  - "%luckyblock_luck_bar%"
  - "&7Tier: %luckyblock_luck_tier%"
  - ""
  - "&7Broken today: &e%luckyblock_breaks_daily%"
  - "&7Broken total: &e%luckyblock_breaks_total%"
  - ""
  - "&8Server today: &7%luckyblock_breaks_global_daily%"

Chat Example

{DISPLAYNAME} &8[Luck: %luckyblock_luck_formatted%&8]: {MESSAGE}

Leaderboard (DeluxeMenus)

# Show a "top breaker" button if player broke 10+ blocks this week
view_requirement:
  requirements:
    active_breaker:
      type: '>='
      input: '%luckyblock_breaks_weekly%'
      output: '10'

Changelog

v1.0.0 — Initial Release

The Lucky Block system, the full luck engine, all 14 reward types, the complete in-game GUI (main menu, reward list, reward editor with sub-GUIs for enchantments/mobs/potions/commands), configurable crafting, en_US + pl_PL localisation, and the full PlaceholderAPI integration all shipped in this initial release.

See the site-wide Changelog for the running log of what's shipped across every PluggLAB project.