Leasehold
你通过付费获得的土地——它会缩小,而不会消失。
免费且开源。适用于 Paper 1.21+。无依赖项、无需数据库、不需要经济插件。
问题所在
每个拥有领地(claims)的服务器最终都会陷入同样的境地:地图被那些一年前就停止玩的人所占据。新玩家到来,走了二十分钟,却发现每一条河流和每一座平坦的山丘都已经被某个永远不会再登录的人所有了。
通常的修复方法是在 N 天闲置后删除领地。这个修复方案造成的玩家流失比问题本身更严重,因为它也会删除那些去度假、生病或只是忙碌了两周的人的基地。
替代方案
领地需要支付租金。通过游戏行为积累租金。如果你资金短缺,你的土地会按照你控制的顺序失效。
最新失效。 投机性的前哨站和沿河的土地掠夺会比任何你在乎的东西先失效。
你的主基地最后失效。 你可以标记它,它是服务器上最后一个停止受保护的地方。
暂停的领地在整个宽限期内继续提供保护——默认是一周。这是针对度假情况的,也是为什么该设计在拥有真实玩家的服务器上很安全的原因。缺钱几天对你没有任何损失。
超过宽限期后会缩小,而不是消失。 领地会收缩到锚点周围的一个小核心区域。你的建筑仍然受到保护;周围的空旷公顷土地回归荒野。这正是服务器想要收回的土地。
支付即可立即恢复一切——完整大小、完整保护、同一刻生效。没有计时器,没有惩罚,无需重新申请。
永远不会删除任何东西,并且拥有一个领地的玩家永远不会被驱逐出该领地。他们将无处可回,而这正是整个设计旨在避免的结果。
服务器收回空置地。没有人失去建筑。
领地是围绕锚点的球体,而非区块矩形
你可以通过看着一个方块并运行命令来申请领地。领地是该方块周围的半径——你可以走到那里、看到并指向它。“你的领地有多大取决于中间那个方块”这句话是新玩家无需打开地图就能理解的概念。
命令
/leasehold claim — 申请你当前看向的方块周围的土地
/leasehold home — 将你所在的领地标记为最后失效的领地
/leasehold list — 查看你的领地及其状态
/leasehold rent — 查看你拥有的领地、土地成本以及你的缺口
/leasehold abandon — 放弃你当前所在的领地
别名:/lh、/claim。管理员拥有 leasehold.admin 权限,可以在任何地方建造并绕过限制。
配置
默认设置经过调整,以便租金从离开的人那里收回土地,而不是向在线的人征税。有三个重要设置:
grace-days(默认值 7) 是文件中最重要的数字。它是度假情况下的设置。一周意味着在一周内租金不足对玩家来说毫无损失。将其设置为零,你就构建了一个每个人都讨厌的领地删除插件,只不过步骤更多而已。
core-radius(默认值 8) 是失效领地收缩到的大小。永远不要为零:中间的建筑物保持受保护,只有周围的空置地回归荒野。
rent-per-day(默认值 10) 故意设得很低。
两个有意的遗漏:租金不是货币——不能购买、交易或发送,因为一旦它可以转移,一个活跃玩家可以资助二十个休眠领地,这正是本插件要解决的问题。并且 AFK 池不赚取任何租金:只有自上一个间隔以来移动过的玩家才会获得租金信用。
安装
将 jar 文件放入 plugins/ 目录,重启服务器,看着一个方块并运行 /leasehold claim。领地和余额存储在 plugins/Leasehold/claims.yml 中——这是一个纯 YAML 文件,你可以手动打开并修复。
源代码
衰减决策位于 UpkeepLadder 中:没有 Bukkit 类型,没有自己的时钟,没有存储。这就是为什么上述承诺是通过测试证明的,而不是在注释中断言的原因——包括那些只有在活服务器上偶然才会触发的测试,例如当其他所有东西都失效时主基地幸存的情况。测试编写得如此严格,以至于一个无操作实现会导致测试失败。
GPL-3.0-or-later.
Leasehold
Land you hold by paying for it — that shrinks instead of vanishing.
Free and open source. Paper 1.21+. No dependencies, no database, no economy plugin needed.
The problem
Every server with claims ends up the same way: a map held by people who stopped playing a year ago. New players arrive, walk for twenty minutes, and find every river and every flat hill already owned by someone who will never log in again.
The usual fix is to delete claims after N idle days. That fix costs more players than the problem does, because it also deletes the base of whoever went on holiday, got ill, or had a busy fortnight.
What this does instead
Claims cost rent. Rent accrues by playing. If you run short, your land lapses in an order you control.
Newest first. The speculative outpost and the land grab by the river go before anything you care about.
Your home base is last. You mark it, and it is the final thing on the server to stop being protected.
A suspended claim keeps protecting for the whole grace window — a week by default. This is the holiday case, and it is why the design is safe on a server with real people on it. Being short for a few days costs you nothing.
Past grace it shrinks, it does not vanish. The claim pulls back to a small core around the anchor. Your build stays protected; the empty hectares around it return to the wilderness. That is exactly the land the server wanted back.
Paying restores everything instantly — full size, full protection, same tick. No timer, no penalty, no re-claiming.
Nothing is ever deleted, and a player with one claim is never evicted from it. They would have nothing to come back to, which is the outcome this whole design exists to avoid.
The server reclaims empty ground. Nobody loses a build.
Claims are spheres on an anchor, not chunk rectangles
You claim by looking at a block and running a command. The claim is a radius around that block — something you can walk to, see, and point at. "Your claim is as big as the block in the middle says" is a sentence a new player understands without opening a map.
Commands
/leasehold claim — claim the ground around the block you are looking at
/leasehold home — mark the claim you are standing in as the last to lapse
/leasehold list — your claims and their state
/leasehold rent — what you hold, what your land costs, how short you are
/leasehold abandon — give up the claim you are standing in
Aliases: /lh, /claim. Admins get leasehold.admin to build anywhere and bypass the limit.
Configuration
The defaults are tuned so rent reclaims land from people who LEFT, rather than taxing the people who are here. Three settings matter:
grace-days (default 7) is the most important number in the file. It is the holiday case. A week means being short on rent for a week costs a player nothing at all. Set it to zero and you have built the same claim-deleting plugin everyone hates, just with extra steps.
core-radius (default 8) is what a lapsed claim shrinks TO. Never zero: the build in the middle stays protected and only the empty ground around it goes back to the wilderness.
rent-per-day (default 10) is deliberately low.
Two deliberate omissions: rent is not a currency — it cannot be bought, traded or sent, because the moment it is transferable one active player can bankroll twenty dormant claims, which is the exact problem this fixes. And AFK pools earn nothing: rent is credited only to players who have moved since the last interval.
Install
Drop the jar into plugins/, restart, look at a block and run /leasehold claim. Claims and balances live in plugins/Leasehold/claims.yml — plain YAML you can open and fix by hand.
Source
The decay decision lives in UpkeepLadder: no Bukkit type, no clock of its own, no storage. That is why the promises above are proven by tests rather than asserted in a comment — including the ones a live server only reaches by accident, like the home base surviving when everything else has lapsed. The tests are written so a no-op implementation fails them.
GPL-3.0-or-later.
评论 0
登录后参与评分
还没有评论,来抢沙发吧