⚔ GracePeriod+
GracePeriod+ 是一款 PaperMC 插件,可为新加入或特定玩家提供可配置时长的 PvP(以及可选的怪物)保护——非常适合生存服、SMP 服和竞技服务器。
功能特性
- 新手保护期 - 自动保护首次加入服务器的玩家
- 全服保护期 - 通过实时倒计时暂停所有玩家的 PvP
- 单人保护 - 可随时为单个玩家额外授予保护期
- 怪物保护 - 可选择防止怪物锁定或攻击处于保护期的玩家
- 动作栏 / BossBar 计时器 - 在物品栏上方或屏幕顶部显示实时倒计时,结束后平滑淡出
- LuckPerms 集成 - 当玩家受到保护时,自动分配并移除一个可配置的
[GRACE] 用户组,并带有彩色前缀
- 持久化保护期 - 保护计时器在服务重启或玩家断开连接后依然保留
- 实时配置重载 - 无需重启服务器即可更改设置
支持
如果您发现任何错误或有任何建议,请加入我的 Discord Server。
依赖要求
安装步骤
- 将
GracePeriodPlus-1.0.0.jar 放入您的 plugins/ 文件夹中
- 确保已安装 LuckPerms
- 启动服务器——插件将自动生成
config.yml 并创建 grace LuckPerms 用户组
命令
所有命令均需 graceplugin.admin 权限(默认:OP)。
| 命令 |
描述 |
/grace specific <player> <time> |
为指定玩家授予个人保护期 |
/grace period <time> |
启动全服保护期(禁用所有人的 PvP) |
/grace end |
提前结束当前的全服保护期 |
/grace end <player> |
提前结束指定玩家的个人保护期 |
/grace status [player] |
查看自己或其他玩家的保护状态 |
/grace reload |
无需重启即可重载 config.yml |
时间格式
| 输入 |
含义 |
30s |
30 秒 |
5m |
5 分钟 |
2h |
2 小时 |
3d |
3 天(最大值:999d) |
120 |
120 秒(纯数字表示秒数) |
权限
| 权限 |
描述 |
默认值 |
graceplugin.admin |
访问所有 /grace 命令 |
OP |
graceplugin.bypass |
可以自由攻击受保护的玩家 |
false |
配置说明
# 新玩家首次加入后受到保护的时间长度(单位:秒)。
# 设置为 0 以禁用。
new-player-grace-duration: 300
protection:
# 阻止玩家攻击处于保护期的玩家(反之亦然)
block-player-damage: true
# 阻止怪物锁定或攻击处于保护期的玩家
block-mob-damage: false
luckperms:
# 在保护期间分配的 LuckPerms 用户组名称(会自动创建)
group-name: "GRACE"
# 用户组前缀的颜色 — MiniMessage 格式
# 选项:<green>, <red>, <gold>, <aqua>, <yellow>, <blue>, <white> 等
group-prefix-color: "<green>"
messages:
grace-start: "<green><bold>✦ 保护期</bold></green> <gray>您将在 <yellow>{time}</yellow> 内免受 PvP 伤害。</gray>"
grace-end: "<red><bold>✦ 保护期结束</bold></red> <gray>您不再受 PvP 保护。</gray>"
cannot-attack: "<red>您在保护期内无法攻击其他玩家!</red>"
cannot-be-attacked: "<red><yellow>{player}</yellow> 当前处于保护期,无法被攻击!</red>"
specific-success: "<green>已向 <aqua>{player}</aqua> 应用时长为 <yellow>{time}</yellow> 的保护期。</green>"
period-start-broadcast: "<gold><bold>⚔ 全服保护期</bold></gold> <gray>PvP 已禁用 <yellow>{time}</yellow>。享受和平吧!</gray>"
period-end-broadcast: "<red><bold>⚔ 全服保护期结束</bold></red> <gray>PvP 已重新启用。祝好运!</gray>"
reload-success: "<green>GracePeriod+ 配置已成功重载。</green>"
no-permission: "<red>您没有权限使用此命令。</red>"
usage: "<red>用法: /grace <specific|period|reload></red>"
timer:
# 倒计时器的显示方式 — "actionbar"(物品栏上方)或 "bossbar"(屏幕顶部)
display-type: "actionbar"
actionbar-format: "<gold><bold>⚔ 保护期:</bold></gold> <yellow>{time}</yellow>"
bossbar-title: "<gold>⚔ 保护期: <yellow>{time}</yellow>"
bossbar-color: "YELLOW" # WHITE, YELLOW, GREEN, BLUE, RED, PURPLE, PINK
bossbar-style: "SOLID" # SOLID, SEGMENTED_6, SEGMENTED_10, SEGMENTED_12, SEGMENTED_20
# 保护期结束时计时器淡出所需的时间(单位:tick,20 = 1 秒)
fade-out-ticks: 40
LuckPerms 用户组
在首次启动时,GracePeriod+ 会自动创建一个名为 grace(可配置)的 LuckPerms 用户组,并带有彩色前缀。当玩家的保护期开始时,他们会被添加到此用户组;保护期结束时则会被移除——即使他们在保护期间离线也会生效。
前缀颜色可通过 config.yml 中的 MiniMessage 标签进行配置。
工作原理
新手保护: 当玩家首次加入服务器时,他们会自动进入个人保护期,持续时间为配置设定的时长。在此期间,只有该特定玩家受到保护——其他玩家不受影响。
个人保护 (/grace specific): 可随时为个别玩家授予保护期。适用于欢迎回归玩家或由工作人员酌情处理。
服务器宽限期(/grace period): 在指定时间内禁用全服务器的 PvP。所有玩家会通过动作栏或 BossBar 看到实时倒计时。计时结束后,PvP 将自动恢复。
生物保护: 当 block-mob-damage: true 时,生物将完全忽略处于宽限保护状态的玩家——它们不会攻击、寻路靠近或对玩家造成伤害。适用于所有类型的生物,包括投射物。
许可证
© 2025 JustBuddy. All Rights Reserved.
编译后的 JAR 文件可免费下载并在你的服务器上运行。源代码可通过我的 Patreon 获取。
购买即授予你个人、不可转让的许可证,仅限用于查看和修改源代码以供私人使用。该许可证仅授予购买账户本人,不得转让给他人。
你不得重新分发或发布源代码,不得转售或重新授权,也不得与他人共享你的副本。违反任何条款将立即终止你的许可证,且你必须删除所有源代码副本。
⚔ GracePeriod+
GracePeriod+ is a PaperMC plugin that protects new and specific players from PvP (and optionally mobs) for a configurable amount of time — perfect for survival, SMP, and competitive servers.
Features
- New player grace period - automatically protects players the first time they join
- Server-wide grace period - disable PvP for all players with a live countdown timer
- Per-player grace - grant individual players an additional grace period at any time
- Mob protection - optionally prevent mobs from targeting or damaging grace players
- Action bar / BossBar timer - real-time countdown shown above the hotbar or at the top of the screen, with a smooth fade-out when done
- LuckPerms integration - automatically assigns and removes a configurable
[GRACE] group with a coloured prefix while a player is protected
- Persistent grace periods - grace timers survive server restarts and player disconnects
- Live config reload - change settings without restarting the server
Support
If you find any bugs or have any suggestions join my Discord Server.
Requirements
Installation
- Drop
GracePeriodPlus-1.0.0.jar into your plugins/ folder
- Make sure LuckPerms is installed
- Start the server - the plugin will generate a
config.yml and create the grace LuckPerms group automatically
Commands
All commands require the graceplugin.admin permission (default: OP).
| Command |
Description |
/grace specific <player> <time> |
Give a specific player a personal grace period |
/grace period <time> |
Start a server-wide grace period (disables PvP for everyone) |
/grace end |
End the active server-wide grace period early |
/grace end <player> |
End a specific player's personal grace period early |
/grace status [player] |
Check the grace status of yourself or another player |
/grace reload |
Reload the config.yml without restarting |
Time Format
| Input |
Meaning |
30s |
30 seconds |
5m |
5 minutes |
2h |
2 hours |
3d |
3 days (max: 999d) |
120 |
120 seconds (plain number = seconds) |
Permissions
| Permission |
Description |
Default |
graceplugin.admin |
Access to all /grace commands |
OP |
graceplugin.bypass |
Can attack grace-protected players freely |
false |
Configuration
# How long (in seconds) a brand-new player is protected after their first join.
# Set to 0 to disable.
new-player-grace-duration: 300
protection:
# Prevent players from attacking grace-protected players (and vice versa)
block-player-damage: true
# Prevent mobs from targeting or damaging grace-protected players
block-mob-damage: false
luckperms:
# Name of the LuckPerms group assigned during grace (created automatically)
group-name: "GRACE"
# Colour of the group prefix — MiniMessage format
# Options: <green>, <red>, <gold>, <aqua>, <yellow>, <blue>, <white>, etc.
group-prefix-color: "<green>"
messages:
grace-start: "<green><bold>✦ Grace Period</bold></green> <gray>You are protected from PvP for <yellow>{time}</yellow>.</gray>"
grace-end: "<red><bold>✦ Grace Period Over</bold></red> <gray>You are no longer protected from PvP.</gray>"
cannot-attack: "<red>You cannot attack players during your grace period!</red>"
cannot-be-attacked: "<red><yellow>{player}</yellow> is currently in a grace period and cannot be attacked!</red>"
specific-success: "<green>Grace period of <yellow>{time}</yellow> applied to <aqua>{player}</aqua>.</green>"
period-start-broadcast: "<gold><bold>⚔ Server Grace Period</bold></gold> <gray>PvP disabled for <yellow>{time}</yellow>. Enjoy the peace!</gray>"
period-end-broadcast: "<red><bold>⚔ Server Grace Period Over</bold></red> <gray>PvP has been re-enabled. Good luck!</gray>"
reload-success: "<green>GracePeriod+ config reloaded successfully.</green>"
no-permission: "<red>You don't have permission to use this command.</red>"
usage: "<red>Usage: /grace <specific|period|reload></red>"
timer:
# How to display the countdown — "actionbar" (above hotbar) or "bossbar" (top of screen)
display-type: "actionbar"
actionbar-format: "<gold><bold>⚔ Grace Period:</bold></gold> <yellow>{time}</yellow>"
bossbar-title: "<gold>⚔ Grace Period: <yellow>{time}</yellow>"
bossbar-color: "YELLOW" # WHITE, YELLOW, GREEN, BLUE, RED, PURPLE, PINK
bossbar-style: "SOLID" # SOLID, SEGMENTED_6, SEGMENTED_10, SEGMENTED_12, SEGMENTED_20
# How long the timer takes to fade out when the grace period ends (in ticks, 20 = 1 second)
fade-out-ticks: 40
LuckPerms Group
On first startup, GracePeriod+ automatically creates a LuckPerms group named grace (configurable) with a coloured prefix. Players are added to this group when their grace period starts and removed when it ends - even if they go offline mid-grace.
The prefix colour is configurable via MiniMessage tags in config.yml.
How It Works
New player grace: When a player joins for the first time, they are automatically placed in a personal grace period for the configured duration. During this time only that specific player is protected — other players are unaffected.
Personal grace (/grace specific): Grants an individual player a grace period at any time. Useful for welcoming returning players or staff discretion.
Server grace (/grace period): Disables PvP for the entire server for the specified duration. A live countdown is shown to all players via action bar or BossBar. PvP is automatically restored when the timer ends.
Mob protection: When block-mob-damage: true, mobs will completely ignore grace-protected players - they won't target, pathfind toward, or deal damage to them. Works for all mob types including projectiles.
License
© 2025 JustBuddy. All Rights Reserved.
The compiled JAR is free to download and use on your server. The source code is available via my Patreon.
Purchasing grants you a personal, non-transferable license to view and modify the source code for private use only. This license is granted to the purchasing account only and may not be transferred to another person.
You may NOT redistribute or publish the source code, resell or relicense it, or share your copy with others. Violation of any of these terms immediately terminates your license and you must delete all copies of the source code.
评论 0
登录后参与评分
还没有评论,来抢沙发吧