» Hightly configurable and lightweight plugin for rewarding player that mines a specific block.
Create and unlimited amount of blocks that will give player rewards after mining.
» All configuration is seperated per block.
» Each block can do different actions on mine, destroy or reset.
» Rewards can be simply configurated per place.
» Holograms (Supported CMI, HolographicDisplays and DecentHolograms)
» Placeholders (Supported PlaceholderAPI)
» Offline cache reward system
» Permission system
» Enchant limiting
» AntiAFK system & Captcha
» AntiCheat system. Can block FASTBREAK cheats.
» Mining effects, make block harder to mine.
» Cooldown and schedules, make block appear once a time or specified on time
» Full language support
» GUIs for every block
» History of block destroys
» Easy to use and configurate
» No dependency, only holograms!
» Zero lag plugin
» MySQL and SqLite support
» Development API
» AutoSave for no data loss
» Everything reloadable with in-game command
» HEX and Gradient text supported
» Download this plugin to your server folder
» Reload/Restart server
* Default block is created at 0,0 world
» Edit config for correct block locations and type
» For holograms select your correct provider
» For storage setup database
» Reload/Restart server
» And enjoy!
» Discord invite: https://discord.gg/kwU9YjyuPw
»
/mysteryblocks help
- Print help menu* firemysteryblocks.command.help
»
/mb list
- Prints all blocks and their info* firemysteryblocks.command.list
»
/mb reload
- Reloads plugin* firemysteryblocks.command.reload
»
/mb messages
- Toggle viewing of messages from plugin* firemysteryblocks.command.messages
»
/mb hide
- Toggle player hiding while mining* firemysteryblocks.command.visibility
»
/mb teleport <block>
- Teleports you to mystery block* firemysteryblocks.command.teleport
»
/mb create <block>
- Creates a new mysteryblock* firemysteryblocks..commandcreate
»
/mb delete <block>
- Deletes existing mysteryblock* firemysteryblocks.command.delete
»
/mb set <block>
- Reposition existing mysteryblock* firemysteryblocks.command.set
»
/mb finish <block>
- Skip progress of existing mysteryblock* firemysteryblocks.command.finish
»
/mb reset <block>
- Reset existing mysteryblock progress* firemysteryblocks.command.reset
»
/mb resetall
- Reset progress of all mystery blocks* firemysteryblocks.command.resetall
»
/mb open <block> [player]
- Open specific mysteryblock gui* firemysteryblocks.command.open
»
/mb history <block> <entry>
- Show mysteryblock destroy history* firemysteryblocks.command.history
»
/mb breaks-add <block> <number> [player]
- Adds mines to mysteryblock* firemysteryblocks.command.breaks-add
»
firemysteryblock.<blockname>.mine
- Allow player to mine specific block»
firemysteryblock.<blockname>.bypass.<type>
- Ignores specific effect of block» anti-cheat - Ignore anti-cheat checks
» mining-effects - Ignore effect applied on mining
» enchant-limit - Ignore item enchant limits
» anti-afk - Ignore anti-afk checks
» item-damage - Ignore tool damage
»
%FireMysteryBlocks_<BLOCK>_REQUIRED%
- Return number of required block mines»
%FireMysteryBlocks_<BLOCK>_CURRENT_<ASC/DESC>%
- Return number of current block mines»
%FireMysteryBlocks_<BLOCK>_PLAYER%
- Return number of player mines»
%FireMysteryBlocks_<BLOCK>_POSITION_<1-X>_<NAME/MINES>%
- Return data of position»
%FireMysteryBlocks_<BLOCK>_PROGRESS_<BAR/PERCENTAGE>%
- Return progress of block mined»
%FireMysteryBlocks_<BLOCK>_DESTROYS%
- Return number of how many times block was destroyed»
%FireMysteryBlocks_<BLOCK>_COOLDOWN_ACTIVE%
- Return boolean if cooldown is active»
%FireMysteryBlocks_<BLOCK>_COOLDOWN_CURRENT_<FORMATTED/SHORT/PLAIN>%
- Return string of current cooldown time»
%FireMysteryBlocks_<BLOCK>_SCHEDULE_<PREV/NEXT>%
- Return date, when will be block regenerated at.»
%FireMysteryBlocks_<BLOCK>_SCHEDULE_<PREV/NEXT>_<FORMAT>%
- Return formatted date, when will be block regenerated at.»
%FireMysteryBlocks_<BLOCK>_SCHEDULE_REMAINING_<FORMATTED/SHORT/PLAIN>%
- Return string of remaining time to regeneration»
%FireMysteryBlocks_<BLOCK>_HISTORY_SIZE%
- Return number of history saved»
%FireMysteryBlocks_<BLOCK>_HISTORY_DATE_<1-X>%
- Return string of date, when was block destroyed»
%FireMysteryBlocks_<BLOCK>_HISTORY_POSITION_<1-X>_<1-X>_MINES%
- Return history player mines»
%FireMysteryBlocks_<BLOCK>_HISTORY_POSITION_<1-X>_<1-X>_NAME%
- Return history player name»
%FireMysteryBlocks_<BLOCK>_REGENERATION_ACTIVE%
- Return boolean if regeneration is active»
%FireMysteryBlocks_<BLOCK>_REGENERATION_AMOUNT%
- Return number of regenerated health»
%FireMysteryBlocks_<BLOCK>_REGENERATION_CURRENT_<FORMATTED/SHORT/PLAIN>%
- Return string of current regeneration timeLegend:
» ASC - In ascending order
» DESC - In descending order
» BAR - Return progress as ASCII bar
» PERCENTAGE - Return progress as number
» PREV - Return previous date
» NEXT - Return next date
» FORMAT - Return date in format (dd.MM.yyyy HH:mm:ss)
» FORMATTED - 02:16:05
» SHORT - 2h 16m 5s
» PLAIN - 8156
» 1-X - Position of player
» NAME - Return name of player
» MINES - Return number of mines of player
YAML:
# Ways to use Gradient or HEX colors. For more info visit https://www.spigotmc.org/resources/iridiumcolorapi.87351/
# - <GRADIENT:FirstHexColor>This is gradient text</GRADIENT:SecondHexColor> | <GRADIENT:FFFFFF>
# - <SOLID:HexColor>This is solid HEX color string | <SOLID:FFFFFF>
# - <RAINBOW>This is rainbow text</RAINBOW>
Settings:
Debug: false
AutoSave:
# If enabled, plugin will save block data automatically to database per some time
# denying plugin data loss on server crash.
Enabled: true
# Time in seconds between saves. Lower time = lower rollback on crash
# Recommended time is 5 minutes (300s), same as bukkit auto-save time
Time: 300
Database:
# Types: SQLITE | MYSQL
# If using SQLITE ignore login values bellow.
Type: SQLITE
Login:
Host: localhost
User: root
Pass: password
Port: 3306
DB: database
Settings:
MaximumPoolSize: 10
IdleTimeout: 30000
Holograms:
# If enabled, plugin will try to hook into hologram provider.
Enabled: false
# Providers: CMI, HolographicDisplays, DecentHolograms
# If you know any other ones. Feel free to contact me about hooking them.
Provider: NONE
Placeholders:
Enabled: true
# Configuration for percentage placeholder
Percentage:
Total: 5
Tiles:
Low: "&c■"
Half: "&a■"
Full: "&2⬛"
YAML:
#
# Action types:
# [COMMAND] - Executes a command as player
# [OP-COMMAND] - Executes a command as oped player
# [CONSOLE-COMMAND] - Executes a command from console
# [MESSAGE] - Sends a message to a player
# [BROADCAST] - Sends a message to everyone
# [SOUND] - Plays a sound to player. Format: SOUND-VOLUME-PITCH
# [ACTIONBAR] - Shows an action bar message to a player
# [WARN] - Shows specific message to a player with the permission "firemysteryblocks.warn"
# [TITLE] - Shows a title message to a player, \n for second line
# [EFFECT] - Adds an effect to player. Format: EFFECT-AMPLIFIER-DURATION
# !! - Format: [TYPE] [VALUE], Sequence is required in Cache, Delay, Percentage order!
#
# Placeholders:
# - {0} - Block name
# - {1} - Block material
# - {2} - Player name
# - {3} - Block current mines
# - {4} - Block remaining mines
# - {5} - Block required mines
# - {6} - Player current mines
# - {7} - Player current mine speed
# - {8}, {9}, {10} - Cooldown time .. FORMATTED, SHORT, PLAIN
# - {11} - Block mine percentage
# - {12} - Block mine progress (in progress bar format)
# - {13} - Next schedule time
# - {14}, {15}, {16} - Schedule remaining time before autoDestroy .. FORMATTED, SHORT, PLAIN
# - {17}, {18}, {19} - Time before block is starting regenerating .. FORMATTED, SHORT, PLAIN
# - {pos-1-name} and {pos-1-value} - First position name and mine count. !! MAX TOP 10 !!
# - {history-1-pos-1-name} and {history-1-pos-1-value} - History 1 backwards, position 1 !! MAX TOP 10 !!
# - {history-1-date} - Date of history block break in format "YYYY-MM-dd HH:mm"
#
# Cache (Offline rewards system):
# If a command starts with $ and the affected player is offline, that
# command will be saved and then executed after the player is back online.
# When the player is online, the action will work as normal.
# - Example: [CONSOLE-COMMAND] $give {2} diamond 5
# - Example: [SOUND] $BLOCK_ANVIL_LAND-1-1
#
# Delay (Delayed command execution)
# If a command starts with @timeInMilliseconds@, its execution is delayed.
# Use this if you need to delay a command until other dependencies are loaded.
# Useful in combination with cached commands.
# - Example: [CONSOLE-COMMAND] @1000@give {2} diamond 5
# - Example: [CONSOLE-COMMAND] $@500@say {2} is running delay and cached command
#
# Percentage:
# If a command starts with %percentage%, that command will be executed
# only with a certain percentage.
# Range 0 - 100, decimals are supported
# - Example: [CONSOLE-COMMAND] %10%give {2} diamond 5
# - Example: [MESSAGE] $%50%You're doing well!
#
# ! To disable any of events place [] instead of list
Block:
Material: "STONE"
Location: "world/0/100/0"
# Total block mines required to destroy the block and get rewards.
Limit: 10
# If enabled, the player will need specific permission to be able to mine this block.
# Perm: "firemysteryblocks.BLOCKNAME.mine"
Permission: false
ItemDamage:
# If enabled, pickaxes that mine this mystery block takes durability
# Bypass perm: "firemysteryblocks.BLOCKNAME.bypass.item-damage
Enabled: true
# Amount of durability taken from pickaxe
Damage: 1
# If enabled, unbreaking enchantment will be ignored
IgnoreEnchants: false
# Bypass works as permission, but need to match specific item description
# Regex is supported! To work, all colors are ignored. Format: DISPLAY NAME;;LORE
Bypass:
- "God's pickaxe"
- "This pickaxe name;;This item lore\\nWith next line"
Regeneration:
# If enabled, block will be regenerated if is not mines under specific time
Enabled: true
# Time in milliseconds
Time: 300000
# Types:
# - FULL - Block is completely restarted
# - HEAL - Block is healed to full health
# - ADD - Block damage is added to block max health
Type: FULL
Progressive:
# If enabled, block healing will be progressive and not instant
Enabled: false
# Time in milliseconds
Time: 10000
# Amount of percentage max health added/removed per time
Percentage: 5
# When progressive is NOT enabled, start actions are skipped
Actions:
Start:
- "[BROADCAST] &6&lMysteryBlocks &8&l» &7Block &e{0} &7has started regenerating!"
End:
- "[BROADCAST] &6&lMysteryBlocks &8&l» &7Block &e{0} &7has been fully regenerated!"
Cooldown:
# If enabled, the block will temporarily change into an unbreakable material specified bellow.
# After the specified time, the block is changed back to a normal breakable block.
Enabled: true
Material: "BEDROCK"
# Cooldown time in milliseconds
Time: 300000
Schedule:
# If enabled, the block will respawn only in specific time.
Enabled: false
# Timezone list available at https://code2care.org/pages/java-timezone-list-utc-gmt-offset
TimeZone: "Europe/Prague"
Table:
- "12:00"
- "16:00"
AutoDestroy:
# If enabled, block is automatically destroyed, if not mined under specific time
Enabled: false
Time: 3600000
# If enabled, actions will be made as it was broken, otherwise block will just change into cooldown state
Actions: false
Visibility:
# If enabled, when player starts mining block, all players around this block will be hidden
# after he stops all players will be back visible
Enabled: false
# Radius in block around the mystery block
Radius: 5
EnchantLimit:
# If enabled, player items will be limited to those equal or lower to the specified enchantment limit.
# Enchantments must be used from https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html
# Bypass perm: "firemysteryblocks.BLOCKNAME.bypass.enchant-limit
Enabled: false
List:
- "DIG_SPEED:5"
# Bypass works as permission, but need to match specific item description
# Regex is supported! To work, all colors are ignored. Format: DISPLAY NAME;;LORE
Bypass:
- "God's pickaxe"
- "This pickaxe name;;This item lore\\nWith next line"
ForceField:
# If enabled, player will not be able to get into specific radius around the block
# if he is in radius, he will be pushed out
Enabled: true
# Radius in block around the mystery block
Radius: 1.25
# If enabled, player will be pushed out with knockback
Knockback: true
MiningEffects:
# If enabled, player will have a specific effects applied to them while mining this block.
# Effect must be used from https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html
# In 1.19+, effect FREEZE is supported
# Bypass perm: "firemysteryblocks.BLOCKNAME.bypass.mining-effects
Enabled: false
# These effects are added constantly every tick.
Constant:
# Format: EFFECT-AMPLIFIER
List:
- "SLOW_DIGGING-1"
# These effects have a chance to be added under set cooldown
Percentage:
Cooldown: 30000
# Format: PERCENTAGE-EFFECT-AMPLIFIER-DURATION
List:
- "0.5-HARM-1-10" # 0.5% that player receives damage
- "5-FAST_DIGGING-1-20" # 5% that player gets HASTE 1 for 20 ticks (1 second)
- "10-BLINDNESS-1-100" # 10% that player gets BLINDNESS 1 for 100 ticks (5 seconds)
# Bypass works as permission, but need to match specific item description
# Regex is supported! To work, all colors are ignored. Format: DISPLAY NAME;;LORE
Bypass:
- "God's pickaxe"
- "This pickaxe name;;This item lore\\nWith next line"
History:
# If enabled, after block is destroyed. Date and player mines are saved into history.
Enabled: true
# Amount of saves stored
Count: 5
# Format for date placeholder
Format: "YYYY-MM-dd HH:mm"
# If GUI is enabled, this is the item that will be placed in history slots
# {history-id} gets replaced by current id, only in this section
Item:
Material: "BOOK"
DisplayName: "&f&lHistory {history-id}."
Amount: 1
ModelData: 0
Lore:
- ""
- " &f&lDate:"
- " &f&l» &e{history-{history-id}-date}"
- ""
- " &f&lPosition:"
- " &f&l» &61. &7{history-{history-id}-pos-1-name} &8- &e{history-{history-id}-pos-1-value}x"
- " &f&l» &62. &7{history-{history-id}-pos-2-name} &8- &e{history-{history-id}-pos-2-value}x"
- " &f&l» &63. &7{history-{history-id}-pos-3-name} &8- &e{history-{history-id}-pos-3-value}x"
- ""
# If GUI is enabled, this is slot numbers where history items will be placed
Slots: "21,22,23,24,25"
GUI:
# If enabled, GUI for this block gets created. Using /fmb open <blockName> can be opened.
Enabled: true
# Size from 9 to 54
Size: 45
Title: "MysteryBlock - {0}"
Items:
0~8:
Material: "BLACK_STAINED_GLASS_PANE"
DisplayName: "&r"
Lore: []
# ItemFlags: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/ItemFlag.html
ItemFlags:
- "HIDE_ATTRIBUTES"
36~44:
Material: "BLACK_STAINED_GLASS_PANE"
DisplayName: "&r"
Lore: []
19:
Material: "STONE"
DisplayName: "&c&l{0} Block - Stats"
Lore:
- ""
- " &f&lCurrent:"
- " &f&l» &61. &7{pos-1-name} &8- &e{pos-1-value}x"
- " &f&l» &62. &7{pos-2-name} &8- &e{pos-2-value}x"
- " &f&l» &63. &7{pos-3-name} &8- &e{pos-3-value}x"
- ""
- " &f&lRewards:"
- " &f&l» &750% &65x &eDiamond"
- ""
- " &7*Break this block, get rewards!*"
- ""
40:
Material: "BARRIER"
DisplayName: "&cClose"
Lore: []
Actions:
40:
# If close is set to true will close inventory on click
Close: true
List:
- "[MESSAGE] &6&lMysteryBlocks &8&l» &7Closing.."
21~25:
Close: false
List:
- "[MESSAGE] &6&lMysteryBlocks &8&l» &7This is history click action.."
Click:
# If enabled, player that left click this block, will be affected by actions specified down bellow.
Enabled: true
Actions:
- "[MESSAGE] &6&lMysteryBlocks &8&l» &7Opening GUI of &e{0}&7."
- "[CONSOLE-COMMAND] fmb open {0} {2}"
AntiCheat:
# If enabled, player mining speed is measured and if it exceeds the limit,
# actions specified under this limit will be executed.
# !! For every block, you will need to find out the max mine speed a player can achieve without cheating! !!
# Bypass perm: "firemysteryblocks.BLOCKNAME.bypass.anti-cheat
Enabled: true
# Period for which mine speed is calculated. Set in milliseconds.
# Example. 1000 -> 2 mines per 1000 milliseconds
Time: 1000
# Specific cooldown for actions, if an action was already executed.
# The same action will be executed repeatedly in this time period.
Cooldown: 30000
# If the player has mine speed above this limit, all block breaks will be ignored.
# Set to -1 if you want to ignore it.
Break: 6
# Actions performed after the player reaches the above limit.
Action:
2:
- "[WARN] {2} is mining block {0} too fast!"
6:
- "[CONSOLE-COMMAND] kick {2} You are mining block {0} too fast!"
AntiAFK:
# If enabled, players that are mining will be randomly interrupted
# depending on method to stop them from afk mining.
# Bypass perm: "firemysteryblocks.BLOCKNAME.bypass.anti-afk
Enabled: false
# Type: KNOCKBACK, CAPTCHA
Selected: "NONE"
# Chance from 0.0 to 100
Chance: 10
Methods:
Knockback:
# How much you want to throw the player away.
Power: 1
# If enabled, player will be turned away from block on knockback
Rotation: false
# If enabled, player that are moving will not be affected by knockback
Moving: true
Captcha:
# When enabled, players that won't complete the captcha under limit, will be treated as if they failed.
Time:
Enabled: true
# Time in milliseconds
Limit: 30000
Inventory:
# Sizes allowed: 5, 9, 18, 27, 36, 45, 56
Size: 5
# Enabling this will ignore if the player clicks on an empty item in inventory
SkipBlank: false
# Material that will be used in menu
Active:
Material: "BEDROCK"
DisplayName: "&c&lCAPTCHA ITEM"
Lore:
- "&r"
- "&7 Click this item to verify you aren't afk &r"
- "&r"
# Material that will be filled in all other slots
Fill:
Enabled: true
Item:
Material: "STONE"
DisplayName: "&r"
Lore: []
Action:
OnFail:
- "[CONSOLE-COMMAND] kick {2} You have failed CAPTCHA!"
OnSuccess:
- "[MESSAGE] &c&lFireMysteryBlocks &8&l» &7Captcha was successfully checked!"
Hologram:
# If enabled, holograms will be placed above this block.
# It's required to have holograms enabled in the main config and the right provider selected!
Enabled: true
# Placeholder injection to positions.
# If enabled, placeholder {pos-1-name} will be injected with prefix and suffix placeholders or text.
NameInjection:
Enabled: false
Inject:
Prefix: "%vault_prefix% "
Suffix: " %vault_suffix%"
# If enabled, for every changeable placeholder you will need to use placeholder from PAPI.
Static:
Enabled: false
# Active is set when there is no cooldown on the block.
# Inactive is set when the cooldown is active.
State:
Inactive:
Lines:
- "&6&lThis is an {0} block"
- ""
- "Current mines: &e{3}/{5}"
- ""
- "1. {pos-1-name} - {pos-1-value}x"
- "2. {pos-2-name} - {pos-2-value}x"
- "3. {pos-3-name} - {pos-3-value}x"
- ""
- "&7*Block will regenerate after.. &a{9}&7*"
Y-Offset: 2
Active:
Lines:
- "&6&lThis is an {0} block"
- ""
- "Current mines: &e{3}/{5}"
- ""
- "1. {pos-1-name} - {pos-1-value}x"
- "2. {pos-2-name} - {pos-2-value}x"
- "3. {pos-3-name} - {pos-3-value}x"
- ""
- "&7* Break this block to get rewards *"
Y-Offset: 2
# Additional configurations for Holograms
Providers:
CMI:
# Perm: cmi.hologram.FMB-BLOCKNAME
# BlockName is the name of file without .yml at the end
RequirePerms: false
# Set LOSInterval to 0 to disable
LOSInterval: 0
TextDownOrder: true
TextSpacing: 0.25
IconSpacing: 0.5
ShowRange: 8
UpdateRange: 8
# Set UpdateInterval to 0 to disable
UpdateInterval: 0
HolographicDisplays:
AllowPlaceholders: false
DecentHolograms:
# Perm: decentholograms.hologram.FMB-BLOCKNAME
# BlockName is the name of file without .yml at the end
RequirePerms: false
UpdateRange: 48
ShowRange: 48
TextDownOrder: false
AlwaysFacePlayer: false
Facing: 0
# Set UpdateInterval to 0 to disable
UpdateInterval: 2
Action:
OnReset:
- "[SOUND] UI_TOAST_CHALLENGE_COMPLETE-1-1"
- "[BROADCAST] &6&lMysteryBlocks &8&l» &7Block &e{0} &7has been regenerated!"
OnMine:
- "[SOUND] BLOCK_ANVIL_LAND-1-1"
- "[ACTIONBAR] &7Your mine speed is {7}/s"
- "[MESSAGE] &6&lMysteryBlocks &8&l» &7You mined &e{0} &7block. (&6{6}x&7)."
OnDestroy:
Global:
- "[BROADCAST] &6&lMysteryBlocks &8&l» &7Block &b{0} &7was mined! Miners: "
- "[BROADCAST] &6&lMysteryBlocks &8&l» &r &f1. &e{pos-1-name} &7mined &6{pos-1-value}&7x"
- "[BROADCAST] &6&lMysteryBlocks &8&l» &r &f2. &e{pos-2-name} &7mined &6{pos-2-value}&7x"
- "[BROADCAST] &6&lMysteryBlocks &8&l» &r &f3. &e{pos-3-name} &7mined &6{pos-3-value}&7x"
- "[BROADCAST] &6&lMysteryBlocks &8&l» &r &f4. &e{pos-4-name} &7mined &6{pos-4-value}&7x"
- "[BROADCAST] &6&lMysteryBlocks &8&l» &r &f5. &e{pos-5-name} &7mined &6{pos-5-value}&7x"
EveryPlace:
- "[MESSAGE] &6&lMysteryBlocks &8&l» &7You mined &e{6} &7blocks."
PerPlace:
1:
- "[CONSOLE-COMMAND] say {2} mined most of the stone. Total: {6}x"
- "[CONSOLE-COMMAND] $give {2} diamond 5"
2~3:
- "[CONSOLE-COMMAND] say {2} was on second or third place"
- "[CONSOLE-COMMAND] $%50%give {2} gold 5"
Java:
Work in progress..
» By purchasing plugin you automatically agree to these terms.
» You are not permitted to decompile or change my plugin.
» No refunds or chargebacks are allowed.
» You are not allowed to distribute this plugin in any way.
» Do not ask for support or report bugs in reviews.
» Plugin is for use only on your network/server.
» I am allowed to update these terms how ever I like without notifying anyone about the update.
If you really like my work. Feel free to donate me some coffee.
Donate link: https://paypal.me/firestone82