LandClaim
适用于 Paper/Purpur 26.3(Java 25)的基于区块的土地保护插件。
版本 2.1.0 · Minecraft 26.3 · 服务端
LandClaim 允许玩家购买其所处的区块,防止被破坏,并管理有权在此处建造的信任列表。该插件提供基于粒子效果的多区块选择流程、区块预留、相邻/批量折扣以及双经济后端支持(优先使用 MultiBank,回退至 Vault)。
功能
- 付费认领区块。 玩家可以以可配置的价格认领其当前所在的区块。价格可以是固定值或每认领一个区块的乘数倍率,并支持配置每个玩家的认领上限。
- 带实时预览的多区块选择。
/claim select、confirm 和 cancel 命令允许玩家一次性选择多个相邻区块,在购买前会通过彩色边框粒子进行显示。
- 折扣机制。 包含相邻折扣(与现有已认领区块相邻的每个区块)和批量折扣(整个选择范围超过阈值时),两者可叠加,但受可配置的最大折扣率限制。
- 区块预留。 支付少量费用即可预留某个区块,防止他人认领;设有过期窗口,且预留费用可选地计入最终购买金额。注意:预留仅阻止他人认领,并不提供保护。
- 信任管理。 支持按区块设置信任和全局信任,提供
/trust、/untrust、/trustall、/untrustall 和 /trustlist 命令。
- 防破坏保护。 阻止未经授权的方块破坏/放置、水桶使用、爆炸、火势蔓延、活塞破坏(推入和拉出)、末影人破坏、农田/海龟蛋践踏、容器及交互访问、实体偷窃(盔甲架、物品展示框、画作、矿车、船),以及缓冲保护:外部人员无法放置、破坏或坐在上面。从物品栏放置任何实体均视为建造行为,因此不能在别人的领地内放下盔甲架、船或末影水晶。领地内的 PvP 为可选开关。
- 免费采矿区(可配置)。
protection-min-y 定义了一个 Y 轴高度,低于此高度的任何玩家都可以在任意领地内挖掘和建造。请参阅配置部分中的安全注意事项。
- 边界粒子效果。 当玩家进入他人领地时,可选地显示粒子轮廓。
- 双经济系统。 主用 MultiBank,备选 Vault,异步解析;模式和优先级均可配置。
- 快速安全的存储。 SQLite(
claims.db)完全加载到内存中以实现 O(1) 查找;所有查询均使用预编译语句,并在专用的单线程数据库执行器上运行。
- 开发者 API。
LandClaimApi 注册在 Bukkit 的 ServicesManager 中。
命令
所有命令均通过 Paper Brigadier 生命周期注册。
| 命令 |
描述 |
权限 |
/claim |
认领你当前所在的区块(打开选择流程)。 |
无 |
/claim particles |
切换领地边界粒子效果。 |
无 |
/claim select |
将当前区块添加到多区块选择中。 |
无 |
/claim confirm |
购买当前选择的区块。 |
无 |
/claim cancel |
取消当前的选择/预览。 |
无 |
/claim remove |
从选择中移除当前区块。 |
无 |
/claim reserve |
预留当前区块。 |
无 |
/claim unreserve |
释放对当前区块的预留。 |
无 |
/claim reservations |
列出你的活跃预留。 |
无 |
/unclaim |
放弃你当前所在的区块认领。 |
无 |
/claims |
列出你的认领区块。 |
无 |
/claiminfo |
显示当前区块的信息。 |
无 |
/trust <player> |
在当前领地中信任一名玩家。 |
无 |
/untrust <player> |
移除某人在当前领地中的信任状态。 |
无 |
/trustall <player> |
在所有你的领地中信任一名玩家。 |
无 |
/untrustall <player> |
在所有你的领地中移除对某人的信任。 |
无 |
/trustlist |
列出当前领地的信任玩家列表。 |
无 |
/claimadmin unclaim |
强制放弃某个区块的认领。 |
landclaim.admin |
/claimadmin info |
管理员查看领地信息。 |
landclaim.admin |
/claimadmin bypass |
切换保护绕过权限。 |
landclaim.admin |
/claimadmin reload |
重新加载配置文件。 |
landclaim.admin |
权限
这些权限节点在运行时检查(它们未在插件描述文件中预声明,因此未注册的节点默认仅限操作员使用)。管理员权限节点名称可通过 admin.permission 配置。
| 节点 |
描述 |
默认值 |
landclaim.admin |
访问 /claimadmin 命令并绕过领地所有权检查。 |
op |
landclaim.unlimited |
绕过每个玩家的 max-claims 上限限制。 |
op |
配置
config.yml 关键设置(完整列表和内联注释请参见配置文件):
economy:
mode: AUTO # AUTO(先 MultiBank 后 Vault)、MULTIBANK 或 VAULT
priority: ["MULTIBANK", "VAULT"]
claims:
price: 150000.0
price-mode: FLAT # FLAT(固定)或 MULTIPLIER(乘数)
max-claims: 5 # 0 = 无限制
max-selection: 9
# 保护从该 Y 坐标开始。低于此高度,任何人都可以在任意领地内建造/破坏/打开物品。
# 默认值 -64 保护完整的垂直列。
protection-min-y: -64
reservation:
enabled: true
price: 5000.0
expiry-days: 7
discounts:
adjacency-enabled: true
bulk-enabled: true
max-discount-rate: 0.25
protection:
block-explosions: true
block-fire-spread: true
block-piston-grief: true
block-enderman-grief: true
block-pvp-in-claims: false
关于 protection-min-y 的安全说明。 shipped 默认值为 -64,保护完整的垂直列。如果你将其调高(例如设为 30 以创建“免费采矿区”),请注意,该 Y 坐标以下的所有内容在任何领地内都将不受保护——玩家可以挖入领地的地下室并自由打开箱子或破坏方块,因此请确保玩家知晓该线以下的存储空间是暴露的。
安装
- 需要 Paper 或 Purpur 26.3 以及 Java 25(2.0.0 版本运行于 26.2,1.x 版本运行于 1.21.x)。
- 可选的辅助插件(参见依赖项):MultiBank、Vault、PlayerSettings。
- 将
LandClaim-2.0.0.jar 放入 plugins/ 目录并启动服务器一次以生成 config.yml。
- 调整
config.yml(特别是 claims.price、max-claims 和 protection-min-y),然后运行
/claimadmin reload。
依赖项
所有集成均为可选(软依赖);LandClaim 可在无这些插件的情况下正常运行。
| 插件 |
用途 |
| MultiBank |
主要经济后端(辅助插件)。 |
| Vault |
当缺少 MultiBank 时的经济回退方案。 |
| PlayerSettings |
按玩家解析语言设置(辅助插件)。 |
MultiBank 和 PlayerSettings 是同一作者开发的辅助插件,核心领地/保护功能并不强制要求它们。
支持 / 源码
源码与问题反馈:
许可证
依据 GNU General Public License v3.0 发布。请参阅 LICENSE。
LandClaim
Chunk-based land protection for Paper/Purpur 26.3 (Java 25).
Version 2.1.0 · Minecraft 26.3 · Server-side
LandClaim lets players buy the chunk they stand in, protect it from griefing, and manage who is
trusted to build there. It ships with a particle-driven multi-chunk selection flow, chunk
reservations, adjacency/bulk discounts, and a dual economy backend (MultiBank with a Vault
fallback).
Features
- Paid chunk claiming. Players claim the chunk they are standing in for a configurable price.
Pricing can be flat or a per-claim multiplier, with a configurable per-player claim cap.
- Multi-chunk selection with live preview.
/claim select, confirm and cancel let players
pick several adjacent chunks at once, shown with colored border particles before purchase.
- Discounts. Adjacency discount (per chunk next to an existing claim) and bulk discount (whole
selection over a threshold), combined and capped by a configurable maximum rate.
- Chunk reservations. Reserve a chunk for a small fee so nobody else can claim it, with an
expiry window and optional credit toward the final purchase. Note: a reservation blocks others
from claiming but does not protect the chunk.
- Trust management. Per-chunk trust plus trust-all, with
/trust, /untrust, /trustall,
/untrustall and /trustlist.
- Grief protection. Blocks unauthorized block break/place, bucket use, explosions, fire spread,
piston grief (push and pull-out), enderman grief, farmland/turtle-egg trampling, container and
interaction access, entity theft (armor stands, item frames, paintings, minecarts, boats), and
cushions: outsiders cannot place, break or sit on them. Placing any entity from an item counts
as building, so armor stands, boats and end crystals cannot be set down in someone else's claim.
PvP inside claims is an optional toggle.
- Free-mining zone (configurable).
protection-min-y defines a Y level below which anyone may
mine and build inside any claim. See the security note in Configuration before shipping the
default.
- Border particles. Optional particle outline shown when a player enters someone else's claim.
- Dual economy. MultiBank primary with a Vault fallback, resolved asynchronously; mode and
priority are configurable.
- Fast and safe storage. SQLite (
claims.db) fully loaded into memory for O(1) lookups; all
queries use prepared statements and run on a dedicated single-thread database executor.
- Developer API.
LandClaimApi is registered in the Bukkit ServicesManager.
Commands
All commands are registered through the Paper Brigadier lifecycle.
| Command |
Description |
Permission |
/claim |
Claim the chunk you are standing in (opens the selection flow). |
none |
/claim particles |
Toggle claim border particles. |
none |
/claim select |
Add the current chunk to the multi-chunk selection. |
none |
/claim confirm |
Purchase the current selection. |
none |
/claim cancel |
Cancel the current selection/preview. |
none |
/claim remove |
Remove the current chunk from the selection. |
none |
/claim reserve |
Reserve the current chunk. |
none |
/claim unreserve |
Release a reservation on the current chunk. |
none |
/claim reservations |
List your active reservations. |
none |
/unclaim |
Unclaim the chunk you are standing in. |
none |
/claims |
List your claims. |
none |
/claiminfo |
Show information about the current chunk. |
none |
/trust <player> |
Trust a player in the current claim. |
none |
/untrust <player> |
Remove a player's trust in the current claim. |
none |
/trustall <player> |
Trust a player across all your claims. |
none |
/untrustall <player> |
Remove a player's trust across all your claims. |
none |
/trustlist |
List trusted players for the current claim. |
none |
/claimadmin unclaim |
Force-unclaim a chunk. |
landclaim.admin |
/claimadmin info |
Admin claim info. |
landclaim.admin |
/claimadmin bypass |
Toggle protection bypass. |
landclaim.admin |
/claimadmin reload |
Reload the configuration. |
landclaim.admin |
Permissions
These nodes are checked at runtime (they are not pre-declared in the plugin descriptor, so
unregistered nodes default to operators only). The admin node name is configurable via
admin.permission.
| Node |
Description |
Default |
landclaim.admin |
Access to /claimadmin and bypass of claim ownership checks. |
op |
landclaim.unlimited |
Bypass the max-claims per-player limit. |
op |
Configuration
Key config.yml settings (see the file for the full list and inline comments):
economy:
mode: AUTO # AUTO (MultiBank then Vault), MULTIBANK, or VAULT
priority: ["MULTIBANK", "VAULT"]
claims:
price: 150000.0
price-mode: FLAT # FLAT or MULTIPLIER
max-claims: 5 # 0 = unlimited
max-selection: 9
# Protection starts at this Y. Below it, ANYONE may build/break/open in any claim.
# Default -64 protects the full vertical column.
protection-min-y: -64
reservation:
enabled: true
price: 5000.0
expiry-days: 7
discounts:
adjacency-enabled: true
bulk-enabled: true
max-discount-rate: 0.25
protection:
block-explosions: true
block-fire-spread: true
block-piston-grief: true
block-enderman-grief: true
block-pvp-in-claims: false
Security note on protection-min-y. The shipped default is -64, protecting the full
vertical column. If you raise it (e.g. to 30 for a "free mining zone" below claims), be aware
that everything below that Y inside any claim becomes unprotected — players can dig into a claim's
basement and open chests or break blocks freely, so make sure your players know storage below the
line is exposed.
Installation
- Requires Paper or Purpur 26.3 and Java 25 (2.0.0 runs on 26.2, 1.x on 1.21.x).
- Optional companions (see Dependencies): MultiBank, Vault, PlayerSettings.
- Drop
LandClaim-2.0.0.jar into plugins/ and start the server once to generate config.yml.
- Adjust
config.yml (especially claims.price, max-claims and protection-min-y) and run
/claimadmin reload.
Dependencies
All integrations are optional (soft dependencies); LandClaim runs without them.
| Plugin |
Purpose |
| MultiBank |
Primary economy backend (companion plugin). |
| Vault |
Economy fallback when MultiBank is absent. |
| PlayerSettings |
Per-player language resolution (companion plugin). |
MultiBank and PlayerSettings are companion plugins by the same author and are not required for the
core claim/protection features.
Support / Source
Source and issues:
License
Released under the GNU General Public License v3.0. See LICENSE.
评论 0
登录后参与评分
还没有评论,来抢沙发吧