SimpleHomes

插件

· 作者 SimplePlugins

/sethome、/delhome、/home

0 本站下载 0 关注 更新于 2 周前

最新 1.0.0 · 26.3 · Folia / Paper

一键开服(送7天)

SimpleHomes

SimpleHomes 是一个家园插件,完全符合你的预期:支持 /sethome、/home、/delhome 和 /homes。配置只需一分钟即可完成,但每条消息、音效、粒子效果、延迟和限制都可以在配置文件中自定义修改。

玩家拥有多少个家园由权限控制,因此它可以与 LuckPerms 或任何其他权限插件配合使用。所有家园数据都保存在一个 homes.yml 文件中。保存操作在后台进行,因此服务器永远不会因为等待磁盘 I/O 而卡顿。

功能特性

  • /sethome、/home、/delhome 和 /homes —— 无需学习其他命令
  • 通过权限设置家园上限:可以是数字(如 simplehomes.limit.5)、配置文件中的命名组(如 simplehomes.limit.vip)或无限制
  • 聊天栏显示家园列表,点击即可传送,悬停时显示世界名称和坐标
  • 当 /home 未指定名称时,若只有一个家园则直接传送,若有默认家园则传送到默认家园;否则显示家园列表
  • 传送带有倒计时和冷却时间
  • 玩家移动或受到伤害时取消传送
  • 传送、等待、设置和删除家园时播放粒子效果和音效
  • 聊天栏和操作栏消息均可编辑,支持十六进制颜色和渐变效果
  • 支持 PlaceholderAPI:所有消息中可使用占位符,并为记分板、标签页和菜单提供自定义占位符
  • 管理其他玩家的家园(例如 /home Steve:base、/homes Steve、/delhome Steve:base),也支持离线玩家
  • 可选:死亡后在家园重生
  • 针对 /sethome 和 /home 的世界黑名单功能
  • 可选功能:降级后的玩家只能使用其在新限额内的最旧家园(不会自动删除任何家园)
  • 可绕过所有限制的权限
  • 控制台通知更新,管理员加入服务器时也会收到提示
  • /simplehomes updateconfig 可在不改动你现有设置的前提下,为新版本添加缺失的配置选项

兼容性

  • Paper、Purpur、Folia 和 Spigot
  • Minecraft 1.20.1 至 26.x
  • Java 17 或更高版本

在 Paper、Purpur 和 Folia 上,目标区块会在传送前异步加载,因此传送到遥远的家园不会导致服务器卡顿。在 Folia 上,每次传送和倒计时都在玩家所属的区域线程中运行。

旧版本和新版本的粒子与音效名称均兼容(例如 VILLAGER_HAPPY 和 HAPPY_VILLAGER),因此升级服务器时无需更改配置文件。

颜色支持:传统的 & 代码、十六进制格式如 &#00a4fc 或 <#00a4fc>,以及渐变色如 <gradient:#4facfe:#00f2fe>Text</gradient>。

命令

命令 描述
/sethome [name] 在你当前位置设置一个家园(如果已存在则覆盖)
/home [name] 传送至某个家园
/delhome <name> 删除一个家园
/homes 在聊天栏列出你的家园
/homes <player> 列出另一名玩家的家园
/home <player>:<home> 传送到其他玩家的家园
/sethome <player>:<home> 为其他玩家设置一个家园
/delhome <player>:<home> 删除其他玩家的家园(也可从控制台执行)
/simplehomes reload 重新加载配置文件
/simplehomes updateconfig 向你的配置中添加缺失的选项
/simplehomes recreateconfig 备份当前配置并生成全新配置
/simplehomes version 显示插件版本及是否有可用更新
/simplehomes help 显示帮助菜单

/shomes 是 /simplehomes 的简写。/deletehome 和 /removehome 等同于 /delhome,/listhomes 等同于 /homes。

权限

权限 作用 默认值
simplehomes.sethome 使用 /sethome 所有人
simplehomes.home 使用 /home 所有人
simplehomes.delhome 使用 /delhome 所有人
simplehomes.homes 使用 /homes 所有人
simplehomes.respawnhome 在家园重生(需在配置中启用 respawn-at-home) 所有人
simplehomes.limit.<number> 允许拥有此数量的家园,例如 simplehomes.limit.5 -
simplehomes.limit.<group> 允许拥有配置文件中定义的组的家园数量,例如 simplehomes.limit.vip -
simplehomes.limit.unlimited 无家园上限 op
simplehomes.home.others 传送到其他玩家的家园 op
simplehomes.sethome.others 为其他玩家设置家园 op
simplehomes.delhome.others 删除其他玩家的家园 op
simplehomes.homes.others 列出其他玩家的家园 op
simplehomes.others 包含上述四项权限 op
simplehomes.admin 使用 /simplehomes 系列命令 op
simplehomes.admin.reload 重新加载配置文件 op
simplehomes.admin.updateconfig 使用 /simplehomes updateconfig op
simplehomes.admin.recreateconfig 使用 /simplehomes recreateconfig op
simplehomes.admin.version 查看插件版本 op
simplehomes.admin.help 查看帮助菜单 op
simplehomes.update 加入服务器时接收更新通知 op
simplehomes.bypass.cooldown 跳过冷却时间 op
simplehomes.bypass.delay 跳过传送延迟 op
simplehomes.bypass.movement 移动不会取消传送 op
simplehomes.bypass.damage 受到伤害不会取消传送 op
simplehomes.bypass.worldblacklist 忽略世界黑名单 op
simplehomes.bypass.excesshomes 即使超过限额仍可使用所有家园 op
simplehomes.bypass.* 所有绕过类权限 op
simplehomes.admin.* 所有管理员权限 op
simplehomes.* 所有权限 op

家园上限

每位玩家默认获得 home-limits.default 数量的家园。可通过权限增加上限,取玩家拥有的最高值为准:

权限 家园数量
无 配置文件中的 default 值(3)
simplehomes.limit.vip 5(来自配置文件的组)
simplehomes.limit.mvp 10(来自配置文件的组)
simplehomes.limit.staff 25(来自配置文件的组)
simplehomes.limit.7 7(任意数字均可)
simplehomes.limit.unlimited 无限制

你可以在 home-limits.groups 中自由重命名、移除或添加组。以下是 LuckPerms 的使用示例:

/lp group vip permission set simplehomes.limit.vip true
/lp user Steve permission set simplehomes.limit.8 true

如果玩家降级,他们的家不会被删除。只是在他们再次低于限制之前无法设置新的家。启用 restrict-excess-homes: true 后,他们也只能使用最旧的家,直到达到新的限制。

/home 不带名称

玩家拥有... /home 执行操作
没有家 提示他们使用 /sethome
恰好一个家 传送至该家
一个名为 home 的家(默认名称) 传送至该家
多个家,但没有名为 home 的 显示家列表

PlaceholderAPI

占位符 显示内容
%simplehomes_count% 玩家拥有的家数量
%simplehomes_limit% 玩家的家的上限(无限制时为 ∞)
%simplehomes_remaining% 玩家还可以设置多少家
%simplehomes_list% 所有家的名称,以逗号分隔
%simplehomes_cooldown% 传送冷却剩余的秒数
%simplehomes_has_<home>% 如果玩家拥有该家则显示 yes / no

无限、无家以及 yes/no 的文本可以在配置的 placeholders 部分中更改。来自其他插件的占位符(如 %player_name%、%vault_eco_balance% 等)可在所有 SimpleHomes 消息中使用。

消息占位符

占位符 用于
{home} 家的名称
{player} 玩家名称(其他玩家消息和列表)
{count} / {limit} 玩家拥有/允许拥有的家数量
{time} 秒数(延迟、倒计时、冷却时间)
{world} {x} {y} {z} 家的位置(列表悬停)
{version} / {latest} 已安装的和最新的插件版本

存储

所有家都存储在 plugins/SimpleHomes/homes.yml 中,按玩家 UUID 分组,因此名称更改不会丢失任何家。每次更改都会立即在后台线程上保存。文件首先写入临时文件,然后进行替换,因此在保存过程中崩溃也不会损坏它。仅在服务器停止时编辑文件。

配置

config.yml
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃             SimpleHomes Configuration v1.0.0            ┃
# ┃                     SimplePlugins                       ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

ConfigVersion: 1.0.0 # 用于自动配置更新 (/simplehomes updateconfig) 请勿更改此项!

# 颜色:&a &l ... | hex:&#00a4fc 或 <#00a4fc> | 渐变:<gradient:#4facfe:#00f2fe>Text</gradient>
# 如果安装了 PlaceholderAPI,PlaceholderAPI 占位符 (%player_name% 等) 可在所有消息中使用
# 粒子效果:https://jd.papermc.io/paper/org/bukkit/Particle.html (旧名称如 VILLAGER_HAPPY 仍然有效)
# 音效:https://jd.papermc.io/paper/org/bukkit/Sound.html

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

更新: 通知: enabled: true # 检查 Modrinth 上是否有新版本(控制台消息) notify-on-join: true # 当玩家加入时,向拥有 simplehomes.update 权限的玩家通知新版本

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

homes: default-name: "家" # /sethome 和 /home(不带名称)时使用的默认名称 name-pattern: "^[A-Za-z0-9_-]{1,16}$" # 允许的家名格式(正则表达式) overwrite-existing: true # 当使用 /sethome <已有名称> 时,会覆盖该位置。设为 false 则玩家必须先执行 /delhome

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

玩家最多可以拥有多少个家。取玩家拥有的最高值生效。

simplehomes.limit.<number> 例如:simplehomes.limit.5

simplehomes.limit.<group> 来自下方的一个权限组,例如:simplehomes.limit.vip

simplehomes.limit.unlimited 无限制(默认:op)

home-limits:

默认值:3 # 每个玩家无需权限即可拥有的家园数量 组别: vip: 5 mvp: 10 staff: 25

失去等级后,玩家仍保留其家园。true = 他们只能使用最旧的 <限制> 个家园

限制多余家园:false

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

homes-list: # /homes clickable: true # 点击列表中的家即可传送至该地点 hover-coordinates: true # 悬停在某个家上时显示世界名称和坐标 sort: created # created = 最早创建优先 | name = 按名称字母顺序 separator: "&7, " # 两个家之间的分隔文本

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

world-blacklist: sethome: # 禁止使用 /sethome 命令的世界 enabled: false worlds: - "world_the_end" teleport: # 玩家无法从这些世界使用 /home 命令 enabled: false worlds: - "pvp_arena" # 对于自定义世界:请使用精确的文件夹名称! chat-message: true # 在聊天栏中显示消息 actionbar-message: true # 在操作栏中显示消息

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

respawn-at-home: enabled: false # 死亡后在家重生(需要 simplehomes.respawnhome 权限) home-name: "home" # 用于重生的家。如果玩家没有该家,则使用其第一个家 ignore-bed-anchor: false # true = 即使玩家拥有床或重生锚,也在家重生

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

command_cooldown: enabled: true # 两次 /home 传送之间的冷却时间 seconds: 10 # 冷却时间(秒)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

actionbar: enabled: true # 动作栏消息的主开关

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

teleport-delay: enabled: true # 传送前等待 seconds: 3 # 延迟时间(秒) chat-countdown-messages: false # 在聊天栏显示倒计时消息 actionbar-countdown-messages: true # 在动作栏显示倒计时消息 chat-teleport-delay: true # 在聊天栏显示“正在传送...” actionbar-teleport-delay: false # 在动作栏显示“正在传送...”

particle_enabled: true # 等待时每秒播放粒子效果 particle_name: PORTAL # 粒子名称 number_of_particles: 30 # 粒子数量 particle_size: 0.6 # 粒子扩散范围

sound_enabled: true # 等待时每秒播放音效 sound_name: BLOCK_NOTE_BLOCK_HAT # 音效名称 sound_volume: 1.0 # 音效音量 sound_pitch: 1.5 # 音效音调 sound_all_players: false # 为附近所有玩家播放音效

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

movement-cancel: enabled: true # 如果玩家移动则取消传送 sensitivity: 1.0 # 玩家在传送被取消前可移动的距离(以方块为单位) cancel-on-block-change: false # 一旦玩家踏入另一个方块立即取消 chat-message: true # 在聊天栏显示消息 actionbar-message: true # 在动作栏显示消息

damage-cancel: enabled: true # 如果玩家受到伤害则取消传送 chat-message: true # 在聊天栏显示消息 actionbar-message: true # 在动作栏显示消息

teleport-cancel: sound_enabled: true # 传送被取消时播放音效 sound_name: ENTITY_VILLAGER_NO # 音效名称 sound_volume: 1.0 # 音效音量 sound_pitch: 1.0 # 音效音调 sound_all_players: false # 为附近所有玩家播放音效

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

on_teleport: chat-message: true # 在聊天栏显示“已传送”消息 actionbar-message: true # 在动作栏显示“已传送”消息

particle_enabled: true # 传送后播放粒子效果 particle_name: END_ROD # 粒子名称 number_of_particles: 40 # 粒子数量 particle_size: 0.8 # 粒子扩散范围

sound_enabled: true # 传送后播放音效 sound_name: ENTITY_ENDERMAN_TELEPORT # 音效名称 sound_volume: 1.0 # 音效音量 sound_pitch: 1.0 # 音效音调 sound_all_players: false # 为附近所有玩家播放音效

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

on_sethome: particle_enabled: true # 设置家园时播放粒子效果 particle_name: HAPPY_VILLAGER # 粒子名称 number_of_particles: 20 # 粒子数量 particle_size: 0.5 # 粒子扩散范围

sound_enabled: true # 设置家园时播放音效 sound_name: ENTITY_PLAYER_LEVELUP # 音效名称 sound_volume: 0.7 # 音效音量 sound_pitch: 1.6 # 音效音调 sound_all_players: false # 为附近所有玩家播放音效

on_delhome: sound_enabled: true # 删除家园时播放音效 sound_name: BLOCK_WOODEN_DOOR_CLOSE # 音效名称 sound_volume: 1.0 # 音效音量 sound_pitch: 1.0 # 音效音调 sound_all_players: false # 为附近所有玩家播放音效

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

PlaceholderAPI: %simplehomes_count%, %simplehomes_limit%, %simplehomes_remaining%,

%simplehomes_list%, %simplehomes_cooldown%, %simplehomes_has_<home>%

placeholders: unlimited: "∞" # 当玩家拥有无限次数时,%simplehomes_limit% 和 %simplehomes_remaining% 显示的内容 no-homes: "-" # 当玩家没有任何家园时,%simplehomes_list% 显示的内容 has-home: "yes" # 当玩家拥有指定家园时,%simplehomes_has_<home>% 显示的内容 has-not-home: "no" # 当玩家没有指定家园时,%simplehomes_has_<home>% 显示的内容

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

actionbar_messages: # 动作栏消息 teleported: "&7已传送至 &#00a4fc{home}" teleport-delay: "&7正在传送,剩余 &#00a4fc{time}s &c(请勿移动!)" countdown: "&7正在传送,剩余 &#00a4fc{time}s" teleport-cancelled: "&c传送已取消(因移动)!" damage-cancelled: "&c传送已取消(因受伤)!" blocked-world: "&c在此世界中不允许设置家园!"

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

占位符:{home} {player} {time} {count} {limit} {world} {x} {y} {z} {version} {latest}

prefix_enabled: true messages: # 聊天消息 prefix: "&8[gradient:#4facfe:#00f2feSimpleHomes</gradient>&8] " home-set: "&7已设置家园 &#00a4fc{home} &8({count}/{limit})" home-moved: "&7已将家园 &#00a4fc{home} &7移动到你所在的位置。" home-exists: "&c你已有一个名为 &f{home}&c 的家园。请先使用 /delhome {home} 删除它。" home-deleted: "&7已删除家园 &#00a4fc{home}&7。" home-not-found: "&c你没有名为 &f{home}&c 的家园。" no-homes: "&c你还没有任何家园。请使用 &f/sethome &c来设置一个。" limit-reached: "&c已达到你的家园数量上限 &f{limit}&c。请先删除一个家园。" invalid-name: "&c无效的家园名称 &f{home}&c。请使用字母、数字、_ 或 -(最多 16 个字符)。" usage-delhome: "&c用法:/delhome <home>" home-over-limit: "&c以你当前的权限,只能使用你的前 &f{limit} &c个家园。" world-not-loaded: "&c此家园所在的维度 &f{world} &c未加载。" teleported: "&7已传送至 &#00a4fc{home}&7。" teleport-delay: "&7将在 &#00a4fc{time} &c秒后传送至 &#00a4fc{home}&7。&c(不要移动!)" countdown: "&7&#00a4fc{time}秒后传送" teleport-cancelled: "&c传送已取消(因移动)!" damage-cancelled: "&c传送已取消(因受到伤害)!" teleport-failed: "&c传送失败。" cooldown: "&c再次传送前必须等待 &#00a4fc{time} &c秒。" sethome-blocked-world: "&c你不能在此维度设置家园!" teleport-blocked-world: "&c你不能在此维度使用 /home 命令!" respawned-at-home: "&7你已在家园 &#00a4fc{home}&7 重生。"

/homes

homes-header: "&7你的家园 &8({count}/{limit})&7:" homes-header-other: "&7&#00a4fc{player} &8的家园 &8({count}/{limit})&7:" homes-entry: "&#00a4fc{home}" homes-entry-locked: "&8{home}" homes-hover: "&7维度:&f{world}\n&7X:&f{x} &7Y:&f{y} &7Z:&f{z}\n&8点击传送" homes-hover-locked: "&c超出你的家园数量上限" no-homes-other: "&c{player} 没有任何家园。"

other players

player-not-found: "&c未找到玩家 &f{player}&c。"

other-home-set: "&7玩家 &#00a4fc{player} &7的家 &#00a4fc{home} &7已设置。" other-home-deleted: "&7玩家 &#00a4fc{player} &7的家 &#00a4fc{home} &7已删除。" other-home-not-found: "&c玩家 &#00a4fc{player} &c没有名为 &f{home}&c 的家。"

general

no-permission: "&c你没有权限。" player-only: "&c只有玩家才能执行此命令。" unknown-command: "&c未知命令。尝试使用 /simplehomes help。" config-reloaded: "&a配置已重新加载。" config-updated: "&a配置已更新至最新版本!" config-up-to-date: "&7你的配置已是最新。" config-recreated: "&a已创建新的 config.yml。旧文件已保存为 &eoldconfig.yml&a。" recreateconfig-failed: "&c无法备份旧的 config.yml。未进行任何更改。" version: "&7你正在运行 &#00a4fcSimpleHomes v{version}&7。" update-available: "&7有新版本可用:&c{version} &8-> &a{latest}\n&7下载:&#00a4fc

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

help-messages: # /simplehomes help

  • "&8&m--------------------------------"
  • "gradient:#4facfe:#00f2feSimpleHomes 帮助</gradient>"
  • "&7/sethome [name] &8- &f设置一个家园。 (simplehomes.sethome)"
  • "&7/home [name] &8- &f传送至一个家园。 (simplehomes.home)"
  • "&7/delhome <name> &8- &f删除一个家园。 (simplehomes.delhome)"
  • "&7/homes [player] &8- &f列出家园列表。 (simplehomes.homes)"
  • "&7/home <player>:<home> &8- &f使用他人的家园。 (simplehomes.home.others)"
  • "&7/simplehomes reload &8- &f重载配置文件。 (simplehomes.admin.reload)"
  • "&7/simplehomes updateconfig &8- &f向配置文件中添加新选项。 (simplehomes.admin.updateconfig)"
  • "&7/simplehomes recreateconfig &8- &f生成全新的配置文件。 (simplehomes.admin.recreateconfig)"
  • "&7/simplehomes version &8- &f查看插件版本。 (simplehomes.admin.version)"
  • "&8&m--------------------------------"

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

</details>

## 指标统计

SimpleHomes 使用 [bStats](https://bstats.org) 收集匿名使用数据,例如服务器拥有多少家园以及使用了哪些功能。你可以在 `plugins/bStats/config.yml` 中为所有插件关闭此功能。

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源