PetCore
舒适且持久的伙伴宠物——你服务器一直缺失的舒适功能,以干净安全的方式实现。
PetCore 为每位玩家提供一只跟随其身后的伴侣动物。它可以被命令停留,或居住在玩家建造的小屋里,并随着时间推移与主人建立羁绊。它没有任何运行时依赖:无需数据库、无需经济插件、无需 WorldGuard、也无需 Bedrock 表单工具包。所有配置均为可读的 YAML 格式,且玩家看到的每一条文本都内置了英文和荷兰语。
? 温馨舒适,绝不涉及战斗。 宠物具有无敌属性,永远不会造成伤害或受到伤害,也绝不会攻击玩家或生物。没有属性增益,没有战斗加成——永远如此。
? 从目录中领养
一个可领养动物的 YAML 目录——包括猫、狗、狐狸、悦灵、嗅探器等,每种动物都有显示名称、权限门槛、运动配置、生物群系亲和度以及背景故事。玩家可以持有最多由权限驱动的槽位数量的动物,并在它们之间切换。可选的单个宠物费用会在领养前运行一条控制台命令,因此可以通过任何经济插件收取金币。
/pet adopt | switch | release | info。
? 三种温馨行为
- 跟随 (Follow) — 走在主人身后,使用 Paper 原版寻路算法,并在距离过远时传送过来跟上。
- 停留 (Stay) — 停留在被放置的位置。
- 回家 (Home) — 居住在主人划定的区域内,在该区域内悠闲漫步。
/pet behind | stay | cage | tphere | tpcage。
? 你自己建造的宠物家园
只需两个角点,输入 /pet savecage,粒子轮廓即可确认范围。通过自包含的大小规则(硬性最小 3×3×2 尺寸及可配置的最大宽/长/高/区块/面积)、可选的允许世界列表以及可选的距离主人限制进行验证——无需土地所有权声明或 WorldGuard 依赖。
? 羁绊等级
羁绊通过温馨时刻增长——靠近主人、在营火旁休息、一起旅行、第一次改名——每个行为都有独立的冷却时间,以防止刷取。跨越等级将解锁头衔、表情动作和外观装饰,并可授予一次性奖励(物品、经验值、控制台命令、聊天行——绝非直接调用经济系统)。平静的羁绊条和操作栏提示保持整体氛围的温和。
? 温馨外观装饰
随机的性格、可解锁的头衔和表情动作、外观风格的家园样式、仅在特定月份出现的季节性粒子装饰、实时的心情、喜爱生物群系的发现,以及纪念品。全部仅为装饰性内容,且均在配置文件中定义。
? 礼物
向其他玩家发送温馨的宠物礼物,他们可以使用令牌领取——这会增加少量羁绊值,并可选地附加外观装饰、头衔或纪念品。一个基于服务注册表构建于宠物之上的可选模块。
/petgift <player> <gift> [note] | list | claim <token>。
实体卫生管理是核心重点
此插件生成并持久化保存生物,因此其设计注重整洁:
- 每只宠物都标记有主人 ID 和自身 ID,并以非持久化方式生成,因此服务器永远不会将其写入区域文件——崩溃或重启后不会留下任何游离宠物。
- 孤儿/重复清理在启用时、区块加载时以及按定时器运行;当你需要时,可使用
/pet cleanup 和 /pet debug。
- 当主人下线时宠物消失,上线时重新生成;笼中的宠物仅当玩家靠近时才显现。
- 默认不使用插件区块票——除非你选择开启,否则宠物永远不会保持区块加载状态。
- 移动使用公共
Mob#getPathfinder() API 和 Bukkit 传送机制——无 NMS、无反射,不受版本锁定。
模块化且独立
每个功能都是一个模块,你可以开启或关闭。pets 是基础模块;可选的 gifts 模块依赖于它,如果宠物模块关闭,它将仅记录一行日志并保持关闭状态,而不是半启动。无需数据库,无需外部插件依赖,所有数据均为纯 YAML 格式。
专为 Paper 26.2 构建
全面使用 Adventure 组件,基于注册表的类型查找,预生成实体配置,现代寻路 API。附带 JUnit 测试,覆盖关键部分:家园边界 containment 和大小说明矩阵、PetMode / PetSupportProfile 解析、羁绊上限与冷却管理、权限驱动的槽位解析、宠物 ID 规范化,以及外观/季节解析。
语言支持
开箱即用支持英语和荷兰语。所有面向玩家的字符串均位于语言文件中——通过复制其中一个即可添加你自己的语言。
PetCore
Cozy, persistent companion pets — the comfort feature your server has been
missing, done cleanly and safely.
PetCore gives every player a companion animal that walks behind them, can be told
to stay or to live in a little home they build, and grows a bond over time.
There are no runtime dependencies at all: no database, no economy plugin, no
WorldGuard, no Bedrock form toolkit. Everything is YAML you can read, and every
word a player sees ships in English and Dutch.
? Cozy, never combat. Pets are invulnerable, never deal or take damage, and
never target players or mobs. No stat buffs, no combat perks — ever.
? Adopt from a catalogue
A YAML catalogue of adoptable animals — cats, dogs, foxes, allays, sniffers and
more — each with a display name, permission gate, locomotion profile, biome
affinity and lore. Players hold several up to a permission-driven slot limit
and switch between them. Optional per-pet cost runs a console command first, so
adoption can charge coins through any economy plugin.
/pet adopt | switch | release | info.
? Three cozy behaviours
- Follow — walks just behind the owner, using the real Paper pathfinder, and
teleports to catch up past a distance.
- Stay — sits where it was left.
- Home — lives inside a region the owner outlines, gently wandering within it.
/pet behind | stay | cage | tphere | tpcage.
? A pet home you build yourself
Two corners, /pet savecage, and a particle outline confirms it. Validated by
self-contained size rules (a hard 3×3×2 minimum and configurable max
width/length/height/chunks/area), an optional allowed-worlds list, and an optional
distance-from-owner limit — no land-claim or WorldGuard dependency.
? Bonding with tiers
Bond grows from cozy moments — being near you, resting by a campfire, travelling
together, a first rename — each on its own cooldown so it can't be farmed. Crossing
a tier unlocks titles, emotes and cosmetics, and can grant a one-time reward
(items, XP, console commands, chat lines — never a direct economy call). A calm
bond bar and action-bar notices keep it gentle.
? Cozy cosmetics
Random personalities, unlockable titles and emotes, cosmetic home
styles, seasonal particle cosmetics (that appear only in their months), a
live mood, favourite-biome discovery, and keepsakes. All decorative, all
in config.
? Gifts
Send another player a cozy pet gift they redeem with a token — applying a small
bond bonus and optionally a cosmetic, title or keepsake. An optional module that
builds on pets through the service registry.
/petgift <player> <gift> [note] | list | claim <token>.
Entity hygiene is the headline
This plugin spawns and persists mobs, so it's built to be tidy:
- Every pet is tagged with its owner and id and spawned non-persistent, so the
server never writes it to region files — a crash or restart leaves no loose
pets.
- Orphan/duplicate sweeps run on enable, on chunk load, and on a timer;
/pet cleanup and /pet debug are there when you want them.
- Pets despawn when their owner logs off and re-spawn on join; caged pets only
materialise when a player is near.
- No plugin chunk tickets by default — pets never keep chunks loaded unless you
opt in.
- Movement uses the public
Mob#getPathfinder() API and Bukkit teleport — no
NMS, no reflection, nothing version-locked.
Modular & standalone
Every feature is a module you can switch on or off. pets is the foundation;
the optional gifts module depends on it and, if pets are off, logs one line and
stays off rather than half-starting. No database, no external plugin dependencies,
all data in plain YAML.
Built for Paper 26.2
Adventure components everywhere, registry-based type lookups, pre-spawn entity
configuration, the modern pathfinder API. Ships with JUnit tests for the parts that
matter: home-bounds containment and the size-validation matrix, PetMode /
PetSupportProfile parsing, bond cap-and-cooldown bookkeeping, permission-driven
slot resolution, pet-id normalisation, and cosmetic/season parsing.
Languages
English and Dutch out of the box. Every player-facing string is in a language file —
add your own by copying one.
评论 0
登录后参与评分
还没有评论,来抢沙发吧