Better Veinminer
? English
版本: 1.5.3 | API: Paper 26.1 – 26.3 (Java 25) | 作者: Duong2012G
许可协议: Apache-2.0 | 链接: Modrinth
一次挥击即可挖掘整条矿脉。开箱即用,所有玩家均可使用,且限制相同——无需权限、等级或每日上限的限制。 等级、权限等级(VIP / Premium)、每日上限以及按矿石类型的冷却时间均为服务器管理员可选的高级功能。
功能
| 功能 |
描述 |
| 同类型矿脉挖掘 |
通过方块面连接(6方向广度优先搜索)查找并破坏所有相连的同类型矿石。被破坏的方块为原点;每次挥击最多挖掘 max-blocks 个方块(默认 64,适用于所有人)。仅角接触的矿石不属于该矿脉。 |
| 通过原版标签支持矿石和工具 |
矿石来自原版方块标签(coal_ores, iron_ores, copper_ores, gold_ores, redstone_ores, lapis_ores, diamond_ores, emerald_ores)以及 NETHER_QUARTZ_ORE 和 ANCIENT_DEBRIS;工具来自 pickaxes 物品标签,因此铜镐可用,后续添加的矿石和镐也将被支持。可通过 ore-types / tool-whitelist 添加单个材料,通过 ore-exclude / tool-exclude 移除。 |
| 潜行激活 |
仅当手持镐具(require-pickaxe)并处于潜行状态(require-sneak)时才会触发矿脉挖掘,因此正常挖掘不受影响。使用 /bvm toggle 可切换开启/关闭(不保存——登出后重置)。 |
| 时运与精准采集 |
每个额外挖掘的方块均使用你当前的镐具进行破坏,因此时运、精准采集以及正确工具规则的行为与原版的逻辑一致(无法开采该矿石的镐具不会掉落任何物品,如同原版)。 |
| 每块矿石的原版经验值 |
额外矿石会掉落其正常的经验值(vanilla-exp,v1.5.3)。精准采集模式和创造模式下不掉落经验,如同原版。可选自定义额外经验:参见 exp-settings。 |
| 耐久度感知 |
挖掘的方块消耗耐久度(damage-tool, damage-multiplier),并具有类似原版的单次破坏防损判定。启用 limit-by-durability 后,矿脉挖掘将仅挖掘工具所能承受的方块数量,而不是挖掘所有方块后再将其破坏(v1.5.3)。不可破坏的工具、具有自定义最大耐久度的工具以及创造模式均能得到正确处理;伤害通过服务器的物品伤害 API 处理,因此物品伤害/物品损坏事件以及损坏动画均能正常工作(v1.5.3)。 |
| 保护插件支持 |
为每个额外方块触发标准的 BlockBreakEvent,因此通过该事件工作的保护插件可以取消单个方块的破坏(被取消的方块将被跳过,矿脉其余部分仍会被挖掘)。仅当玩家自身的破坏未被任何插件优先级的事件取消时,矿脉挖掘才会开始(v1.5.3)。 |
| 对掉落插件友好 |
如果其他插件在这些事件中设置了 setDropItems(false)(自定义掉落、自动拾取等),则方块将被移除而不掉落原版物品,从而避免重复掉落(v1.5.3)。 |
| 低延迟友好 |
大型矿脉会在多个刻内完成挖掘(blocks-per-tick,默认 50),且搜索过程永远不会加载未加载的区块(v1.5.3)。 |
| 防递归保护 |
在矿脉挖掘批次运行时,玩家会被保存在一个内部集合中,以便插件忽略自身触发的 BlockBreakEvent 事件。 |
| 特效 |
在原点方块处产生粒子效果,并在矿脉挖掘完成时为玩家播放完成音效。可在 effects 中选择粒子类型(BLOCK, SMOKE, DUST 及颜色...)和音效;无效值将在控制台中报告。 |
| 统计数据 |
按玩家追踪已挖掘的方块数和矿脉挖掘次数(/bvm stats),并异步保存至 plugins/BetterVeinminer/stats/<uuid>.yml;仅写入发生更改的玩家。 |
| 世界限制 |
通过世界名称或世界键(如 minecraft:overworld)设置 whitelist-worlds / blacklist-worlds。 |
| 开发者 API |
在挖掘额外方块之前触发的可取消事件 BetterVeinmineEvent。 |
服务器管理员的可选功能(默认全部关闭)
| 功能 |
作用 |
等级系统 (tier-system.enabled) |
玩家通过挖掘矿脉方块升级至 4 个等级(默认分别为 100,000 / 500,000 / 1,000,000 个方块)。等级会用其自身的限制替代全局的 max-blocks(默认分别为 32 / 64 / 128 / 256)。即使系统关闭也会记录进度,因此稍后启用时会保留所有人的进度。使用 /bvm tier 可查看玩家的限制和进度。 |
权限等级 (permission-levels) |
奖励部分玩家:拥有某条目权限的玩家将获得该条目的 max-blocks 和/或 cooldown-ms。条目仅提高限制并降低冷却时间;任何人都无需权限即可进行矿脉挖掘。节点 betterveinminer.vip 和 betterveinminer.premium 存在且默认为 false,但可使用任意节点。 |
每日上限 (daily-limits) |
限制每位玩家每天的矿脉挖掘次数(启用时默认为 10)。在服务器本地午夜重置;计数器随定期自动保存一起保存。 |
按矿石类型的冷却时间 (per-ore-cooldowns) |
每种矿石拥有独立的冷却时间。启用后将替换普通冷却时间,包括权限等级的快速冷却时间。 |
自定义经验值 (exp-settings) |
每次矿脉挖掘提供额外的经验值奖励(base-exp + 每个额外方块的 per-extra-block),可选择性地乘以时运等级和 ore-multipliers。此奖励叠加在原版的经验值之上。 |
要求
- Minecraft 26.3 上的 Paper 服务器(针对 26.3 API 编译)。
plugin.yml 声明了 api-version: 26.1,因此允许 26.1 和 26.2 加载它,但仅针对 26.3 进行了优化。
- Java 25(Minecraft 26.x 本身所必需)
- 运行在 1.21.x 上的服务器必须继续使用 BetterVeinminer 1.5.2。
- 仅限 Paper API:不支持 Spigot,且未声明支持 Folia。
安装
- 将
BetterVeinminer-1.5.3.jar 放入服务器的 plugins/ 文件夹中。
- 启动一次服务器;此时会创建
plugins/BetterVeinminer/config.yml 文件。
- 编辑该文件,并通过
/bvm reload 应用更改(无需重启服务器)。
从旧版本升级时会保留你的 config.yml:缺失的键会自动回退到新的默认值。统计文件和 data.yml 保持原有格式不变。
使用方法
默认情况下,你需要潜行(Shift),手持镐子,并挖掘一种矿石。在以下限制范围内,单次挥击即可开采整条矿脉。
仅当满足以下条件时才会触发链式挖矿:
enabled: true,玩家拥有 betterveinminer.use 权限(默认所有人都有),且未使用 /bvm toggle 关闭功能
- 世界被允许(白名单 / 黑名单),且被破坏的方块是已启用的矿石
- 玩家处于潜行状态(当
require-sneak: true 时)并持有配置好的工具(当 require-pickaxe: true 时)
- 玩家的自行破坏行为未被取消,冷却时间已过,并且如果启用了每日限制,未达到上限
在创造模式下也可以进行链式挖矿,但不会掉落物品,工具也不会受损。
命令与权限
| 命令 |
权限 |
描述 |
/bvm toggle |
betterveinminer.use (默认: 所有人) |
开启或关闭你自己的链式挖矿功能。不保存 — 登出后会重置。 |
/bvm stats |
betterveinminer.use |
显示你挖掘的方块数量、等级以及使用的链式挖矿次数。 |
/bvm tier |
betterveinminer.use |
显示你当前的上限,如果开启了等级系统,还会显示你的等级和进度。 |
/bvm reload |
betterveinminer.admin (默认: op) |
重新加载 config.yml。 |
/veinminer 是 /bvm 的别名。/bvm 命令本身需要 betterveinminer.use 权限,默认所有人都有此权限。
betterveinminer.vip 和 betterveinminer.premium (默认: 无人拥有) 单独存在时无效 — 它们仅在
某个 permission-levels 条目中使用它们时才有效。
配置
所有配置均位于 plugins/BetterVeinminer/config.yml 中。超出范围的数值会被自动限制。
| 键名 |
默认值 |
范围 |
描述 |
enabled |
true |
|
总开关。 |
require-sneak |
true |
|
玩家必须处于潜行状态。 |
require-pickaxe |
true |
|
玩家必须手持工具列表中的工具。 |
max-blocks |
64 |
1 – 1000 |
每次链式挖矿的最大方块数(包含原点),对所有人相同(除非开启了等级或权限级别)。 |
cooldown-ms |
200 |
0 – 300000 |
每位玩家两次链式挖矿之间的冷却时间(毫秒)。 |
blocks-per-tick |
50 |
1 – 1000 |
每刻额外挖掘的方块数。数值越低越平滑,越高越快。 |
damage-tool |
true |
|
链式挖矿会消耗工具的耐久度。 |
damage-multiplier |
1.0 |
0.1 – 10.0 |
每个额外方块的耐久度消耗倍率。 |
limit-by-durability |
true |
|
只挖掘工具耐久度所能承受的数量。 |
vanilla-exp |
true |
|
掉落每个额外矿石的原版经验值。 |
particle-effect |
true |
|
生成粒子效果。 |
sound-effect |
true |
|
播放音效。 |
effects.particle-type |
BLOCK |
|
粒子名称或键名。仅支持不需要数据、方块或粉尘颜色的粒子。 |
effects.particle-color |
"0xFFFFFF" |
|
DUST 粒子的颜色:0xRRGGBB、#RRGGBB 或 RRGGBB。 |
effects.particle-speed |
1.0 |
0 – 20 |
粒子扩散速度。 |
effects.completion-sound |
BLOCK_STONE_BREAK |
|
链式挖矿完成时播放的音效(枚举风格名称或键名)。 |
effects.warning-sound |
ENTITY_ITEM_PICKUP |
|
达到每日上限时播放的音效。 |
tier-system.enabled |
false |
|
可选的等级系统。 |
tier-system.tier-2/3/4-threshold |
100000 / 500000 / 1000000 |
≥ 0 |
达到每个等级所需的挖掘方块数。 |
tier-system.tier-1/2/3/4-max-blocks |
32 / 64 / 128 / 256 |
1 – 1000 |
每个等级的上限。 |
permission-levels |
{} |
|
可选。以权限节点为键的条目,每个条目包含 max-blocks 和/或 cooldown-ms。 |
daily-limits.enabled |
false |
|
可选的每日上限。 |
daily-limits.limit-per-day |
10 |
1 – 100000 |
每位玩家每天的链式挖矿次数上限。 |
per-ore-cooldowns.enabled / .cooldowns |
false |
0 – 300000 |
可选的按矿石冷却(矿石名称 → 毫秒);未列出的矿石使用 cooldown-ms。 |
exp-settings.enabled |
false |
|
可选的自定义经验加成。 |
exp-settings.base-exp / .per-extra-block |
10 / 5 |
0 – 10000 / 0 – 1000 |
加成公式。 |
exp-settings.multiply-by-fortune |
true |
|
将加成乘以 (1 + 幸运附魔等级)。 |
ore-multipliers.enabled / .multipliers |
true |
0 – 100 |
仅针对自定义经验加成的按矿石倍率 — 当 exp-settings.enabled 为 false 时无效。 |
messages.* |
见文件 |
|
veinmine-success、cooldown、tier-up、daily-limit、stats(旧版 § 颜色;占位符 {count} {remaining} {tier} {blocks} {uses})。 |
whitelist-worlds |
[] |
|
若非空,则仅允许这些世界(名称或键名)。优先级更高。 |
blacklist-worlds |
[] |
|
禁用链式挖矿的世界(仅当白名单为空时检查)。 |
ore-tags |
coal_ores, iron_ores, copper_ores, gold_ores, redstone_ores, lapis_ores, diamond_ores, emerald_ores |
|
原版/数据包方块标签(不含 #)。 |
ore-types |
NETHER_QUARTZ_ORE, ANCIENT_DEBRIS |
|
叠加在标签之上的单个材料。 |
ore-exclude |
[] |
|
再次移除的材料。 |
tool-tags |
[pickaxes] |
|
原版/数据包物品标签(不含 #)。 |
tool-whitelist |
[] |
|
叠加在标签之上的单个材料。 |
tool-exclude |
[] |
|
再次移除的材料。 |
矿石集合 = ore-tags + ore-types − ore-exclude;工具集合 = tool-tags + tool-whitelist − tool-exclude。
限制如何叠加:玩家的最大方块数为 max-blocks(如果启用了层级系统,则为该层级的限制),并以其拥有的任何权限级别中最高的 max-blocks 值提升。冷却时间在启用时采用单次矿石的冷却时间;否则使用 cooldown-ms,并以其拥有的任何权限级别中最低的 cooldown-ms 值降低。
示例:
# 奖励 VIP 玩家:更大的矿脉和更短的冷却时间(其他玩家保持正常限制)
permission-levels:
betterveinminer.vip:
max-blocks: 128
cooldown-ms: 100
# 将远古残骸排除在矿脉挖掘之外
ore-exclude:
- ANCIENT_DEBRIS
# 仅允许铁镐及更高级别的镐
tool-tags: []
tool-whitelist:
- IRON_PICKAXE
- DIAMOND_PICKAXE
- NETHERITE_PICKAXE
如果某个条目未知(拼写错误,或你的服务器版本中不存在该标签/音效/粒子效果),则在启动和运行 /bvm reload 时会在控制台打印警告信息。
开发者 API
BetterVeinmineEvent 在主线程上触发,位于玩家自身破坏行为之后的下一刻tick,且在额外方块被挖掘之前。取消该事件可阻止矿脉挖掘。当矿脉因更早的原因被拒绝时(例如玩家更换了工具,或工具无法承担挖掘任意一个额外方块的耐久损耗),不会触发此事件。
@EventHandler
public void onVeinmine(BetterVeinmineEvent e) {
if (e.getOreType() == Material.ANCIENT_DEBRIS) {
e.setCancelled(true); // 不挖掘远古残骸所在的矿脉
}
List<Block> blocks = e.getBlocks(); // 不可修改列表;起始方块不包含在内;
// 数量已受工具耐久度限制
e.setExpReward(e.getExpReward() * 2); // 自定义经验奖励倍数(若 exp-settings 关闭则为 0)
}
随后,每个额外方块都会通过针对该玩家触发的常规 BlockBreakEvent 进行破坏。
已知限制
- 额外方块使用
Block#breakNaturally 进行破坏,因此依赖 BlockDropItemEvent 的插件(某些自动拾取 / 自动熔炼插件)可能无法检测到额外方块的掉落物。
- 矿脉定义为通过面相连的同一种精确材质的矿石:一种矿石的石质变体和深板岩变体(例如
DIAMOND_ORE 和 DEEPSLATE_DIAMOND_ORE)被视为独立的矿脉。
更新日志
请参阅 CHANGELOG.md。
Better Veinminer
? English
Version: 1.5.3 | API: Paper 26.1 – 26.3 (Java 25) | Author: Duong2012G
License: Apache-2.0 | Link: Modrinth
Mine a whole ore vein with one swing. Out of the box every player can use it with the same
limit — no permissions, tiers or daily caps get in the way. Tiers, permission levels (VIP / Premium),
daily limits and per-ore cooldowns are optional advanced features for server admins.
Features
| Feature |
Description |
| Same-type vein mining |
Finds every ore of the same type that is connected through block faces (6-direction breadth-first search) and breaks them all. The block you break is the origin; at most max-blocks blocks (default 64, for everyone) are mined per swing. Ores that touch only at a corner are not part of the vein. |
| Ores and tools through vanilla tags |
Ores come from the vanilla block tags (coal_ores, iron_ores, copper_ores, gold_ores, redstone_ores, lapis_ores, diamond_ores, emerald_ores) plus NETHER_QUARTZ_ORE and ANCIENT_DEBRIS; tools from the pickaxes item tag, so the Copper Pickaxe works and so will ores and pickaxes added later. Add single materials with ore-types / tool-whitelist, remove with ore-exclude / tool-exclude. |
| Sneak to activate |
Veinmining only triggers while sneaking (require-sneak) with a pickaxe in hand (require-pickaxe), so normal mining is never affected. /bvm toggle switches it off/on for yourself (not saved — resets when you log out). |
| Fortune & Silk Touch |
Every extra block is broken with your actual pickaxe, so Fortune, Silk Touch and the correct-tool rule behave like vanilla (a pickaxe that cannot harvest the ore yields no drops, like vanilla). |
| Vanilla XP for every ore |
Extra ores drop their normal XP (vanilla-exp, v1.5.3). Silk Touch and Creative mode give none, like vanilla. Optional custom EXP on top: see exp-settings. |
| Durability-aware |
Mined blocks cost durability (damage-tool, damage-multiplier) with a per-hit Unbreaking roll like vanilla. With limit-by-durability the veinmine only mines as many blocks as the tool can afford, instead of mining everything and breaking it (v1.5.3). Unbreakable tools, tools with a custom max durability and Creative mode are handled correctly; damage goes through the server's item-damage API, so item-damage / item-break events and the break animation work like vanilla (v1.5.3). |
| Protection plugin support |
Fires a normal BlockBreakEvent for each extra block, so protection plugins that work through that event can cancel individual blocks (cancelled blocks are skipped, the rest of the vein is still mined). Veinmining only starts when the player's own break was not cancelled, at any plugin priority (v1.5.3). |
| Drop-plugin friendly |
If another plugin sets setDropItems(false) on one of those events (custom drops, auto-pickup...), the block is removed without vanilla drops instead of dropping twice (v1.5.3). |
| Lag-friendly |
Big veins are mined over several ticks (blocks-per-tick, default 50) and the search never loads unloaded chunks (v1.5.3). |
| Anti-recursion guard |
While a veinmine batch runs, the player is held in an internal set so the plugin ignores the BlockBreakEvents it fires itself. |
| Effects |
A particle effect at the origin block and a completion sound for the player when a veinmine finishes. Choose the particle (BLOCK, SMOKE, DUST with a colour...) and the sound in effects; invalid values are reported in the console. |
| Statistics |
Blocks mined and veinmines used are tracked per player (/bvm stats) and saved in plugins/BetterVeinminer/stats/<uuid>.yml; only changed players are written, asynchronously. |
| World restrictions |
whitelist-worlds / blacklist-worlds, by world name or world key (minecraft:overworld). |
| Developer API |
Cancellable BetterVeinmineEvent fired right before the extra blocks are mined. |
Optional features for server admins (all off by default)
| Feature |
What it does |
Tier system (tier-system.enabled) |
Players level up through 4 tiers by veinmining blocks (100 000 / 500 000 / 1 000 000 blocks by default). The tier replaces the global max-blocks with its own limit (32 / 64 / 128 / 256 by default). Progress is tracked even while the system is off, so enabling it later keeps everyone's progress. /bvm tier shows the player's limit and progress. |
Permission levels (permission-levels) |
Reward some players: whoever holds the permission of an entry gets that entry's max-blocks and/or cooldown-ms. Entries only raise the limit and lower the cooldown; nobody needs a permission to veinmine. The nodes betterveinminer.vip and betterveinminer.premium exist and default to false, but any node can be used. |
Daily limits (daily-limits) |
Cap the number of veinmines per player per day (default 10 when enabled). Resets at the server's local midnight; the counters are saved with the periodic auto-save. |
Per-ore cooldowns (per-ore-cooldowns) |
A separate cooldown for each ore. When enabled it replaces the normal cooldown, including the faster cooldown of permission levels. |
Custom EXP (exp-settings) |
A bonus EXP reward per veinmine (base-exp + per-extra-block for each extra block), optionally multiplied by the Fortune level and by ore-multipliers. Added on top of the vanilla XP. |
Requirements
- A Paper server on Minecraft 26.3 (compiled against the 26.3 API).
plugin.yml declares api-version: 26.1, so 26.1 and 26.2 are allowed to load it, but only 26.3 has been targeted.
- Java 25 (required by Minecraft 26.x itself)
- Servers on 1.21.x must stay on BetterVeinminer 1.5.2.
- Paper API only: Spigot is not supported, and Folia is not declared supported.
Installation
- Put
BetterVeinminer-1.5.3.jar into your server's plugins/ folder.
- Start the server once;
plugins/BetterVeinminer/config.yml is created.
- Edit it and apply changes with
/bvm reload (no restart needed).
Upgrading from an older version keeps your config.yml: keys that are missing fall back to the new
defaults automatically. Stats files and data.yml keep their format.
How to use
By default you must sneak (Shift), hold a pickaxe, and mine an ore. The whole vein is mined
with that single swing, within the limits below.
Veinmining only triggers when all of these hold:
enabled: true, the player has betterveinminer.use (everyone does by default) and has not used /bvm toggle to switch it off
- the world is allowed (whitelist / blacklist) and the broken block is an enabled ore
- the player is sneaking (when
require-sneak: true) and holds a configured tool (when require-pickaxe: true)
- the player's own break was not cancelled, their cooldown has expired and, if enabled, the daily limit is not reached
In Creative mode veins are mined too, but nothing drops and the tool takes no damage.
Commands & permissions
| Command |
Permission |
Description |
/bvm toggle |
betterveinminer.use (default: everyone) |
Turn veinmining on/off for yourself. Not saved — resets when you log out. |
/bvm stats |
betterveinminer.use |
Show your blocks mined, tier and veinmines used. |
/bvm tier |
betterveinminer.use |
Show your current limit and, if the tier system is on, your tier and progress. |
/bvm reload |
betterveinminer.admin (default: op) |
Reload config.yml. |
/veinminer is an alias of /bvm. The /bvm command itself requires betterveinminer.use, which everyone has by default.
betterveinminer.vip and betterveinminer.premium (default: nobody) do nothing on their own — they only matter when
a permission-levels entry uses them.
Configuration
Everything lives in plugins/BetterVeinminer/config.yml. Out-of-range numbers are clamped.
| Key |
Default |
Range |
Description |
enabled |
true |
|
Master switch. |
require-sneak |
true |
|
Player must be sneaking. |
require-pickaxe |
true |
|
Player must hold a tool from the tool list. |
max-blocks |
64 |
1 – 1000 |
Max blocks per veinmine, origin included, the same for everyone (unless tiers or permission levels are on). |
cooldown-ms |
200 |
0 – 300000 |
Per-player cooldown between veinmines. |
blocks-per-tick |
50 |
1 – 1000 |
Extra blocks mined per tick. Lower = smoother, higher = faster. |
damage-tool |
true |
|
Veinmined blocks cost tool durability. |
damage-multiplier |
1.0 |
0.1 – 10.0 |
Durability cost per extra block. |
limit-by-durability |
true |
|
Only mine as many blocks as the tool can afford. |
vanilla-exp |
true |
|
Drop the vanilla XP of every extra ore. |
particle-effect |
true |
|
Spawn the particle effect. |
sound-effect |
true |
|
Play the sounds. |
effects.particle-type |
BLOCK |
|
Particle name or key. Only particles that need no data, a block, or a dust colour are supported. |
effects.particle-color |
"0xFFFFFF" |
|
Colour for the DUST particle: 0xRRGGBB, #RRGGBB or RRGGBB. |
effects.particle-speed |
1.0 |
0 – 20 |
Particle spread speed. |
effects.completion-sound |
BLOCK_STONE_BREAK |
|
Sound played when a veinmine completes (enum-style name or key). |
effects.warning-sound |
ENTITY_ITEM_PICKUP |
|
Sound played when the daily limit is reached. |
tier-system.enabled |
false |
|
Optional tier system. |
tier-system.tier-2/3/4-threshold |
100000 / 500000 / 1000000 |
≥ 0 |
Blocks mined to reach each tier. |
tier-system.tier-1/2/3/4-max-blocks |
32 / 64 / 128 / 256 |
1 – 1000 |
Limit of each tier. |
permission-levels |
{} |
|
Optional. Entries keyed by permission node, each with max-blocks and/or cooldown-ms. |
daily-limits.enabled |
false |
|
Optional daily cap. |
daily-limits.limit-per-day |
10 |
1 – 100000 |
Veinmines per player per day. |
per-ore-cooldowns.enabled / .cooldowns |
false |
0 – 300000 |
Optional per-ore cooldown (ore name → ms); unlisted ores use cooldown-ms. |
exp-settings.enabled |
false |
|
Optional custom EXP bonus. |
exp-settings.base-exp / .per-extra-block |
10 / 5 |
0 – 10000 / 0 – 1000 |
Bonus formula. |
exp-settings.multiply-by-fortune |
true |
|
Multiply the bonus by (1 + Fortune level). |
ore-multipliers.enabled / .multipliers |
true |
0 – 100 |
Per-ore multiplier of the custom EXP bonus only — no effect while exp-settings.enabled is false. |
messages.* |
see file |
|
veinmine-success, cooldown, tier-up, daily-limit, stats (legacy § colours; placeholders {count} {remaining} {tier} {blocks} {uses}). |
whitelist-worlds |
[] |
|
If non-empty, only these worlds (name or key). Takes precedence. |
blacklist-worlds |
[] |
|
Worlds where veinmining is disabled (checked only when the whitelist is empty). |
ore-tags |
coal_ores, iron_ores, copper_ores, gold_ores, redstone_ores, lapis_ores, diamond_ores, emerald_ores |
|
Vanilla/datapack block tags (without #). |
ore-types |
NETHER_QUARTZ_ORE, ANCIENT_DEBRIS |
|
Single materials added on top of the tags. |
ore-exclude |
[] |
|
Materials removed again. |
tool-tags |
[pickaxes] |
|
Vanilla/datapack item tags (without #). |
tool-whitelist |
[] |
|
Single materials added on top of the tags. |
tool-exclude |
[] |
|
Materials removed again. |
Ore set = ore-tags + ore-types − ore-exclude; tool set = tool-tags + tool-whitelist − tool-exclude.
How the limits combine: the max blocks of a player is max-blocks (or their tier's limit when the tier
system is on), raised by the highest max-blocks of any permission level they hold. The cooldown is the per-ore
cooldown when that is enabled; otherwise cooldown-ms, lowered by the lowest cooldown-ms of any permission level they hold.
Examples:
# Reward VIPs: bigger veins and a shorter cooldown (everyone else keeps the normal limits)
permission-levels:
betterveinminer.vip:
max-blocks: 128
cooldown-ms: 100
# Keep ancient debris out of veinmining
ore-exclude:
- ANCIENT_DEBRIS
# Allow ONLY iron and better pickaxes
tool-tags: []
tool-whitelist:
- IRON_PICKAXE
- DIAMOND_PICKAXE
- NETHERITE_PICKAXE
If an entry is unknown (a typo, or a tag/sound/particle that does not exist on your server version), a warning is
printed to the console on startup and on /bvm reload.
Developer API
BetterVeinmineEvent is fired on the main thread, one tick after the player's own break, right before the extra
blocks are mined. Cancel it to stop the veinmine. It is not fired when the vein is rejected earlier
(e.g. the player swapped the tool, or the tool cannot afford a single extra block).
@EventHandler
public void onVeinmine(BetterVeinmineEvent e) {
if (e.getOreType() == Material.ANCIENT_DEBRIS) {
e.setCancelled(true); // no veinmining on ancient debris
}
List<Block> blocks = e.getBlocks(); // unmodifiable; the origin block is NOT included;
// already limited by the tool's durability
e.setExpReward(e.getExpReward() * 2); // the custom EXP bonus (0 while exp-settings is off)
}
Every extra block is then broken through a regular BlockBreakEvent fired for the player.
Known limitations
- Extra blocks are broken with
Block#breakNaturally, so plugins that depend on BlockDropItemEvent (some
auto-pickup / auto-smelt plugins) may not see the drops of the extra blocks.
- A vein is the ores of one exact material connected through faces: the stone and deepslate variants of an ore
(e.g.
DIAMOND_ORE and DEEPSLATE_DIAMOND_ORE) are separate veins.
Changelog
See CHANGELOG.md.
评论 0
登录后参与评分
还没有评论,来抢沙发吧