CodellaLuckyBlocks icon

CodellaLuckyBlocks -----

A highly configurable Lucky Blocks plugin for Minecraft 1.8 to latest versions.



[​IMG]
[​IMG] [​IMG] [​IMG]
CodellaLuckyBlocks
CodellaLuckyBlocks is a highly configurable Lucky Blocks plugin for Minecraft (Spigot/Paper) that supports versions 1.8 through the latest releases. The plugin features custom head textures, random rewards, mob spawning, command execution, potion effects, explosions, RGB/hex color support, and complete YAML-based configuration.

✨ Features

Core Functionality
  • Fully Configurable Lucky Blocks - Create unlimited Lucky Block types with custom textures, names, lore, and rewards
  • Custom Head Textures - Use Base64 encoded textures for unique Lucky Block designs
  • Random Reward System - Weighted chance-based reward selection with multiple reward types
  • Multi-Version Support - Works from Minecraft 1.8 to the latest Paper/Spigot versions
  • RGB/Hex Colors - Full support for hex color codes (#RRGGBB) with automatic fallback for older versions
Reward Types
  • Items - Give players items with custom names, lore, and enchantments
  • Commands - Execute console or player commands with placeholder support
  • Potion Effects - Apply potion effects with custom duration and amplification
  • Mob Spawning - Spawn entities with custom names and amounts
  • Explosions - Create explosions with configurable power, fire, and block breaking
  • Messages - Send formatted messages with color and placeholder support
⚙️ Advanced Features
  • Cooldown System - Configurable cooldown between Lucky Block breaks
  • Permission-Based Access - Control who can place, break, or receive specific Lucky Block types
  • Particle & Sound Effects - Customizable visual and audio effects when breaking blocks
  • Title Messages - Show titles to players when they break Lucky Blocks
  • Reload Command - Hot-reload all configurations without restarting the server
  • Production Ready - Fully tested, optimized, and ready for live servers

Commands

Command Description Permission Aliases
Code (Text):
/luckyblocks
Display help menu
Code (Text):
luckyblocks.admin
Code (Text):
/lb
,
Code (Text):
/luckblock
,
Code (Text):
/lblock
Code (Text):
/luckyblocks give <player> <type> <amount>
Give Lucky Blocks to a player
Code (Text):
luckyblocks.give
-
Code (Text):
/luckyblocks reload
Reload all configuration files
Code (Text):
luckyblocks.reload
-
Code (Text):
/luckyblocks list
List all available Lucky Block types
Code (Text):
luckyblocks.admin
-

[hr][/hr]
Permissions
Permission Description Default
Code (Text):
luckyblocks.admin
Access to all admin commands OP
Code (Text):
luckyblocks.place
Allows placing Lucky Blocks True
Code (Text):
luckyblocks.break
Allows breaking Lucky Blocks True
Code (Text):
luckyblocks.give
Allows giving Lucky Blocks OP
Code (Text):
luckyblocks.reload
Allows reloading configurations OP
Code (Text):
luckyblocks.bypass.cooldown
Bypass Lucky Block cooldown OP
Code (Text):
luckyblocks.rare
Access to rare Lucky Blocks (example) OP
Code (Text):
luckyblocks.epic
Access to epic Lucky Blocks (example) OP


Configuration Files

config.yml
Main configuration file containing:
  • Plugin settings (cooldown, placement rules, debug mode)
  • Sound and particle effects configuration
  • Lucky Block type definitions with custom textures
  • All plugin messages with hex color support
  • Title configuration
rewards.yml
Reward configuration file containing:
  • Reward definitions for each Lucky Block type
  • Weighted chance system for reward selection
  • Multiple reward actions per reward
  • Support for all reward types (items, commands, effects, mobs, explosions, messages)

Configuration Examples

Creating a Custom Lucky Block Type
Code (YAML):

lucky-blocks
:
  custom
:
    enabled
: true
    name
: "#FF00FF&l&nMy Custom Block"
    lore
:
     - ""
      - "#00FFFF&oA special Lucky Block!"
      - ""
    texture
: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDU0Y2FmZDk1NmRjZGI2MjI1NTBhOGI2NTRhNGFmNDg3ZjU3OTJmYTU2MmRlNjljNTk2ZWQ4NGI0YTI5M2MifX19"
    permission
: "luckyblocks.custom"
    rewards-file
: "rewards.yml"
    rewards-section
: "custom-rewards"
 
Creating a Custom Reward
Code (YAML):

custom-rewards
:
  reward-1
:
    chance
: 25.0
    enabled
: true
    actions
:
      - type
: ITEM
        material
: DIAMOND_SWORD
        amount
: 1
        name
: "#FF0000&lEpic Sword"
        enchantments
:
         - DAMAGE_ALL:5
          - FIRE_ASPECT:2
      - type
: EFFECT
        effect
: SPEED
        duration
: 600
        amplifier
: 2
      - type
: MESSAGE
        message
: "#00FF00You received an epic reward!"
 
[hr][/hr]
Reward Action Types

ITEM
Give items to players with custom properties:
Code (YAML):

- type
: ITEM
  material
: DIAMOND
  amount
: 5
  name
: "#FFD700Lucky Diamonds"
  lore
:
   - "#00FFFFFrom a Lucky Block!"
  enchantments
:
   - DAMAGE_ALL:10
    - FIRE_ASPECT:3
 
COMMAND
Execute commands from console or as the player:
Code (YAML):

- type
: COMMAND
  executor
: CONSOLE   # or PLAYER
  command
: "eco give %player% 1000"
 
EFFECT
Apply potion effects:
Code (YAML):

- type
: EFFECT
  effect
: SPEED
  duration
: 200   # in ticks
  amplifier
: 2
 
MOB
Spawn entities with custom names:
Code (YAML):

- type
: MOB
  mob
: ZOMBIE
  amount
: 3
  name
: "#FF0000Lucky Zombie"
 
EXPLOSION
Create explosions:
Code (YAML):

- type
: EXPLOSION
  power
: 2.0
  fire
: false
  break-blocks
: false
 
MESSAGE
Send formatted messages:
Code (YAML):

- type
: MESSAGE
  message
: "#00FF00You won #FFD700$1000#00FF00!"
 

Color Support

The plugin supports both legacy color codes and modern hex colors:
Legacy Colors
Use
Code (Text):
&
followed by a color code:
Code (YAML):

name
: "&6&lLucky Block"   # Gold and bold
 
Hex Colors (1.16+)
Use
Code (Text):
#RRGGBB
format for custom colors:
Code (YAML):

name
: "#FFD700&lLucky Block"   # Custom gold color and bold
 
Combined
Mix both formats for maximum compatibility:
Code (YAML):

name
: "#FF00FF&l&nEPIC #FFD700&lLucky Block"
 

Installation

  1. Download the latest
    Code (Text):
    CodellaLuckyBlocks-1.0.0.jar
    file
  2. Place it in your server's
    Code (Text):
    plugins
    folder
  3. Start or restart your server
  4. Configuration files will be automatically generated in
    Code (Text):
    plugins/CodellaLuckyBlocks/
  5. Customize the configuration files to your liking
  6. Run
    Code (Text):
    /luckyblocks reload
    to apply changes

Usage

For Players
  1. Obtain Lucky Blocks from administrators or events
  2. Place the Lucky Block anywhere in the world
  3. Break it to receive a random reward!
  4. Wait for the cooldown before breaking another
For Administrators
  1. Give Lucky Blocks:
    Code (Text):
    /lb give <player> <type> <amount>
  2. Create custom types in
    Code (Text):
    config.yml
  3. Configure rewards in
    Code (Text):
    rewards.yml
  4. Reload configurations:
    Code (Text):
    /lb reload
  5. List all types:
    Code (Text):
    /lb list

️ Technical Details
Version Compatibility
  • Minecraft Versions: 1.8.x - Latest
  • Server Software: Spigot, Paper
  • Java Version: 8+
Multi-Version Support
The plugin uses reflection and abstraction layers to ensure compatibility across all versions:
  • Automatic material name conversion (e.g.,
    Code (Text):
    PLAYER_HEAD
    Code (Text):
    SKULL_ITEM
    )
  • Sound and particle effect compatibility
  • Hex color support with automatic fallback for older versions
  • Entity type conversion for mob spawning
Performance
  • Lightweight and optimized for production servers
  • Efficient cooldown management using HashMap
  • Lazy-loaded configurations
  • Minimal reflection usage for version compatibility

Project Structure

Code (Text):

src/main/java/io/codella1/luckyblocks/
├── CodellaLuckyBlocks.java          # Main plugin class
├── commands/
│   └── LuckyBlocksCommand.java      # Command handler
├── listeners/
│   ├── BlockBreakListener.java      # Lucky Block break event
│   └── BlockPlaceListener.java      # Lucky Block place event
├── managers/
│   ├── ConfigManager.java           # Configuration management
│   ├── CooldownManager.java         # Cooldown system
│   ├── LuckyBlockManager.java       # Lucky Block types management
│   └── RewardManager.java           # Reward loading and selection
├── luckyblocks/
│   └── LuckyBlock.java              # Lucky Block data class
├── rewards/
│   ├── Reward.java                  # Reward data class
│   ├── RewardAction.java            # Reward action data class
│   ├── RewardType.java              # Reward type enum
│   └── RewardExecutor.java          # Reward execution logic
└── utils/
    ├── ColorUtils.java              # Color and hex support
    ├── EffectsUtils.java            # Particles and sounds
    ├── ItemBuilder.java             # Item creation utility
    ├── SkullUtils.java              # Custom skull creation
    └── VersionUtils.java            # Multi-version compatibility
 

Support

For support, bug reports, or feature requests, please contact the plugin author or visit the official support channels.

License
This plugin is licensed under a custom license. All rights reserved by Codella1.

Credits
Developed by:
Codella1
Version: 1.0.0
Plugin Name: CodellaLuckyBlocks

Future Features
Planned features for future updates:
  • Database support for persistent Lucky Block tracking
  • PlaceholderAPI integration
  • Economy plugin integration (Vault)
  • Hologram support for placed Lucky Blocks
  • Lucky Block crafting recipes
  • Animation effects when breaking
  • Custom reward GUI preview
[hr][/hr]
Enjoy using CodellaLuckyBlocks! May your blocks be lucky!


Made with ❤️ by Codella

[​IMG]
Resource Information
Author:
----------
Total Downloads: 10
First Release: Nov 2, 2025
Last Update: Nov 2, 2025
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings