调整大小
平滑地改变玩家在游戏内的体型,支持捐赠者专属等级、自动定时重置以及按世界限制——专为出售体型加成并需要其到期后干净移除的服务器而设计。
依赖
安装
- 将 jar 文件放入服务器的
plugins/ 文件夹中,然后重启(或使用 /reload,但重启更安全)。
- 会在
plugins/Resize/ 下生成 config.yml 和 lang/ 文件夹(包含 en.yml 和 ru.yml)。
- 在
config.yml 中设置 language: "en" 或 language: "ru",编辑你需要的内容,然后运行 /resizereload。
功能
- 平滑、动画化的体型变化(非瞬间切换)
- 无限捐赠者等级 — 定义任意数量的基于权限的体型层级(例如 Iron、Diamond),拥有各自的最小/最大范围,完全可配置,无需修改代码
- 自动定时重置 — 将临时权限授予与
/resizeschedule 配合使用,以便在玩家的捐赠期结束时可靠地将体型恢复为正常状态,即使他们在过期时离线或在此期间服务器重启了
- 按世界限制 — 在指定的世界中完全禁止调整大小,或者强制玩家在进入该世界(例如下界)的瞬间将体型恢复为正常
- 可配置的冷却时间
- 完整的权限集,让管理员精确控制谁可以调整自己的体型、调整他人的体型、绕过冷却时间、绕过世界限制或管理计时器
- 多语言支持(包含英语和俄语),消息文本完全可自定义,包括前缀 —— 全程支持 MiniMessage 格式:命名颜色、
<#RRGGBB> 十六进制色值以及渐变均受支持
- 世界限制、调度计划和冷却时间的总开关,让你只运行所需的功能
命令
| 命令 |
权限 |
描述 |
/resize <scale> |
resizeplugin.resize |
调整自己的体型 |
/resize <player> <scale> |
resizeplugin.resize.others |
调整其他玩家的体型 |
/resizeschedule <player> <duration> |
resizeplugin.schedule |
计划在经过延迟后自动重置回正常体型 |
/resizecancel <player> |
resizeplugin.schedule |
取消待处理的计划重置 |
/resizetime [player] |
resizeplugin.time / resizeplugin.time.others |
检查体型自动重置剩余的时间 |
/resizereload |
resizeplugin.reload |
重新加载 config.yml 和当前激活的语言文件 |
/resizeschedule 的持续时间格式:30d、12h、45m、20s,或组合形式如 1d12h —— 与 LuckPerms 的 settemp 使用的令牌相同。
权限
| 权限 |
默认值 |
描述 |
resizeplugin.resize |
false |
对自己使用 /resize。将此权限授予你的捐赠者等级(或见下文使其对所有人免费) |
resizeplugin.resize.extended |
false |
作为示例捐赠者层级(0.0625–16.0)随插件提供,位于 scale.tiers 中 —— 可自由重命名/替换 |
resizeplugin.resize.others |
op |
调整其他玩家的体型 |
resizeplugin.bypass.cooldown |
op |
绕过冷却时间 |
resizeplugin.bypass.worldrestriction |
op |
完全忽略世界限制 |
resizeplugin.schedule |
op |
使用 /resizeschedule 和 /resizecancel |
resizeplugin.reload |
op |
使用 /resizereload |
resizeplugin.time |
true |
使用 /resizetime 查看自己剩余的倒计时 |
resizeplugin.time.others |
op |
查看其他玩家剩余的倒计时 |
resizeplugin.* |
false |
授予上述所有权限 |
捐赠者体型等级 (scale.tiers)
config.yml 不再是一个固定的范围,而是一个有序的体型等级列表。每个等级都有自己独立的权限节点和最小/最大范围:
scale:
tiers:
- permission: ""
min: 0.8
max: 1.15
- permission: "resizeplugin.resize.extended"
min: 0.0625
max: 16.0
# - permission: "resizeplugin.tier.iron"
# min: 1.0
# max: 1.5
# - permission: "resizeplugin.tier.diamond"
# min: 2.0
# max: 2.5
- 从上到下检查;如果玩家符合多个等级的条件,最后一个匹配的条目生效 —— 因此请先列出较弱/免费的等级,再列出较强/付费的等级。
permission: "" 适用于所有能使用 /resize 的玩家。
- 可以自由添加、重命名、重新排序或删除条目 —— 无需更改代码,只需在编辑后运行
/resizereload。
- 取消注释或复制示例行来创建你自己的捐赠者等级(Iron、Diamond、VIP,无论你在卖什么),每个等级都由其独立的 LuckPerms 权限进行限制。
使 /resize 本身免费(或仅限捐赠者)
默认情况下,使用 /resize 需要 resizeplugin.resize 权限(如果体型是付费加成,推荐这样做)。如果你希望让所有人都能使用基础范围,仅将更大的范围限制在捐赠者等级之后,请在 config.yml 中更改此设置:
features:
require-resize-permission: false
解决经典的“临时权限过期,体型未重置”问题
捐赠面板通常会授予类似以下的体型加成权限:
lp user {player} permission settemp resizeplugin.resize.extended true 30d
仅此一项并不能在 30 天结束后重置玩家的体型 —— LuckPerms 和插件之间互不通信。请配合面板中的第二个命令一起使用:
resizeschedule {player} 30d
插件会将此信息存储在数据文件夹内的 scheduled-resets.yml 中,并按间隔检查到期的重置任务(间隔可在下方配置),即使触发时玩家离线也会应用它 —— 会在他们下次登录时补上。它能在重启后存活,且不依赖于 LuckPerms 权限是否仍然存在;它只是在预定时间可靠地将玩家设置回 scale.base-value。玩家可以使用 /resizetime 查看自己剩余的倒计时。
按世界限制
worlds:
disabled-worlds:
# - "world_nether"
force-reset-worlds:
# - "world_nether"
# - "world_the_end"
disabled-worlds — 当玩家身处这些世界之一时,完全禁用 /resize。
force-reset-worlds — 不仅被禁用,而且玩家一进入(例如“进入下界”)就会立即重置回 scale.base-value(即恢复正常大小,并且在离开前无法再次调整大小)。
- 默认情况下这两个列表均为空,仅在设置
features.world-restrictions-enabled: true 后生效。
resizeplugin.bypass.worldrestriction 允许管理员/工作人员忽略上述两个列表。
开启/关闭功能
config.yml 中包含一个 features 部分,您可以借此在不改动其他配置的情况下禁用插件的某些部分:
features:
world-restrictions-enabled: false # 上述两个世界列表
scheduling-enabled: true # /resizeschedule 和 /resizecancel
cooldown-enabled: true # /resize 冷却时间
require-resize-permission: true # 是否必须拥有 resizeplugin.resize 权限
性能与“每秒检查”调度器
scheduling.check-interval-seconds(默认值为 1)控制插件扫描过期重置任务的频率。这是一个轻量级的内存地图扫描——即使设置为 1 秒,也不会对服务器性能造成明显影响——但如果您希望更加保守,可以将其调高(例如 5),此时重置任务最多可能会延迟该秒数触发。
冷却时间
cooldown:
seconds: 30
玩家对自己使用 /resize 之间必须等待的秒数。如果 features.cooldown-enabled: false,则完全忽略此设置;此外可通过 resizeplugin.bypass.cooldown 为单个玩家绕过冷却限制。
本地化与颜色
config.yml 中的 language 键指向 lang/ 目录下的文件(已包含 en.yml 和 ru.yml —— 只需在该文件夹中放入新的 <code>.yml 文件并将 language 设置为对应名称即可添加自定义语言)。所有消息(包括每行开头显示的 prefix)均存储在该文件中,并使用 MiniMessage 进行解析,因此命名颜色、<#RRGGBB> 十六进制代码以及 <gradient:...> 渐变效果均可在文件中任意位置使用。编辑、保存、执行 /resizereload 即可生效,无需重启服务器。
故障排除
如果未来的 Paper 版本移除了 Attribute.GENERIC_SCALE(目前该属性已被弃用,转而推荐使用注册表查找方式,最早也要到 1.22 才会移除),并且插件因启动时的 Attribute 相关错误而无法加载,请检查是否有插件更新,或在问题追踪器上报告您所使用的确切 Paper 版本。
? 支持与反馈
发现 Bug?有建议?欢迎通过以下方式联系:
- 在 Discord 上联系我:igromania_
Resize
Smoothly change a player's size in-game, with donator classes, automatic timed resets, and per-world restrictions — built for servers that sell size perks and need it to expire cleanly.
Requirements
- Paper (or a Paper fork) 1.21.x
Installation
- Drop the jar into your server's
plugins/ folder and restart (or /reload, though a restart is safer).
- A
config.yml and a lang/ folder (with en.yml and ru.yml) will be generated in plugins/Resize/.
- Set
language: "en" or language: "ru" in config.yml, edit whatever you want, then run /resizereload.
Features
- Smooth, animated size changes (not an instant snap)
- Unlimited donator classes — define any number of permission-based size tiers (e.g. Iron, Diamond) with their own min/max range, fully configurable, no code editing needed
- Automatic timed resets — pair a temporary permission grant with
/resizeschedule so a player's size reliably returns to normal when their donation period ends, even if they were offline when it expired or the server restarted in between
- Per-world restrictions — block resizing entirely in chosen worlds, or force a player's size back to normal the moment they enter one (e.g. the Nether)
- Configurable cooldown between uses
- Full permission set, so admins control exactly who can resize themselves, resize others, bypass the cooldown, bypass world restrictions, or manage timers
- Multi-language support (English and Russian included) with fully customizable message text, including the prefix — MiniMessage formatting throughout: named colors,
<#RRGGBB> hex, and gradients all supported
- Master on/off switches for world restrictions, scheduling, and cooldown, so you only run what you need
Commands
| Command |
Permission |
Description |
/resize <scale> |
resizeplugin.resize |
Resize yourself |
/resize <player> <scale> |
resizeplugin.resize.others |
Resize another player |
/resizeschedule <player> <duration> |
resizeplugin.schedule |
Schedule an automatic reset back to normal after a delay |
/resizecancel <player> |
resizeplugin.schedule |
Cancel a pending scheduled reset |
/resizetime [player] |
resizeplugin.time / resizeplugin.time.others |
Check how long until a size auto-resets |
/resizereload |
resizeplugin.reload |
Reload config.yml and the active language file |
Duration format for /resizeschedule: 30d, 12h, 45m, 20s, or combinations like 1d12h — the same tokens LuckPerms uses for settemp.
Permissions
| Permission |
Default |
Description |
resizeplugin.resize |
false |
Use /resize on yourself. Grant this to your donator rank (or see below to make it free for everyone) |
resizeplugin.resize.extended |
false |
Ships as an example donator tier (0.0625–16.0) in scale.tiers — rename/replace freely |
resizeplugin.resize.others |
op |
Resize other players |
resizeplugin.bypass.cooldown |
op |
Bypass the cooldown |
resizeplugin.bypass.worldrestriction |
op |
Ignore world restrictions entirely |
resizeplugin.schedule |
op |
Use /resizeschedule and /resizecancel |
resizeplugin.reload |
op |
Use /resizereload |
resizeplugin.time |
true |
Check your own remaining time with /resizetime |
resizeplugin.time.others |
op |
Check another player's remaining time |
resizeplugin.* |
false |
Grants everything above |
Donator size classes (scale.tiers)
Instead of one fixed range, config.yml has an ordered list of size classes. Each has its own permission node and its own min/max range:
scale:
tiers:
- permission: ""
min: 0.8
max: 1.15
- permission: "resizeplugin.resize.extended"
min: 0.0625
max: 16.0
# - permission: "resizeplugin.tier.iron"
# min: 1.0
# max: 1.5
# - permission: "resizeplugin.tier.diamond"
# min: 2.0
# max: 2.5
- Checked top to bottom; if a player qualifies for more than one, the last matching entry wins — list weaker/free tiers first, stronger/paid tiers last.
permission: "" applies to everyone who can use /resize at all.
- Add, rename, reorder, or delete entries freely — no code changes needed, just
/resizereload after editing.
- Uncomment or duplicate the example lines to create your own donator ranks (Iron, Diamond, VIP, whatever you sell), each gated by its own LuckPerms permission.
Making /resize itself free (or donator-only)
By default resizeplugin.resize is required to use /resize at all (recommended if size is a paid perk). If you'd rather let everyone use the base range and only gate the bigger ranges behind donator tiers, flip this in config.yml:
features:
require-resize-permission: false
Solving the classic "temp permission expires, size doesn't" problem
Donation panels typically grant a size perk with something like:
lp user {player} permission settemp resizeplugin.resize.extended true 30d
That alone doesn't reset the player's size when the 30 days are up — LuckPerms and the plugin don't talk to each other. Pair it with a second command from your panel:
resizeschedule {player} 30d
The plugin stores this in scheduled-resets.yml inside its data folder, checks for due resets on an interval (configurable, see below), and applies it even if the player is offline when it fires — it catches up on their next login. It survives restarts and doesn't depend on the LuckPerms permission itself still existing; it just reliably sets the player back to scale.base-value at the scheduled time. Players can check their own remaining time with /resizetime.
Per-world restrictions
worlds:
disabled-worlds:
# - "world_nether"
force-reset-worlds:
# - "world_nether"
# - "world_the_end"
disabled-worlds — /resize is blocked entirely while standing in one of these worlds.
force-reset-worlds — blocked and the player's size is instantly reset back to scale.base-value the moment they enter (e.g. "enter the Nether → back to normal size, and can't resize again until they leave").
- Both lists are empty by default and only take effect once
features.world-restrictions-enabled: true is set.
resizeplugin.bypass.worldrestriction lets admins/staff ignore both lists.
Turning features on/off
config.yml has a features section so you can disable parts of the plugin without touching anything else:
features:
world-restrictions-enabled: false # the two world lists above
scheduling-enabled: true # /resizeschedule and /resizecancel
cooldown-enabled: true # the /resize cooldown
require-resize-permission: true # whether resizeplugin.resize is required at all
Performance / the "check every second" scheduler
scheduling.check-interval-seconds (default 1) controls how often the plugin scans for due scheduled resets. This is a cheap in-memory map scan — even at 1 second it's not something you'll notice on server performance — but you can raise it (e.g. 5) if you want to be extra conservative; resets will then fire up to that many seconds late.
Cooldown
cooldown:
seconds: 30
Seconds a player must wait between uses of /resize on themselves. Ignored entirely if features.cooldown-enabled: false, and bypassable per-player with resizeplugin.bypass.cooldown.
Localization & colors
config.yml's language key points at a file in lang/ (en.yml and ru.yml are included — add your own by dropping a new <code>.yml in that folder and setting language to match). Every message, including the prefix shown before each line, lives in that file and is parsed with MiniMessage, so named colors, <#RRGGBB> hex codes, and <gradient:...> all work anywhere in it. Edit, save, /resizereload — no restart needed.
Troubleshooting
If a future Paper release removes Attribute.GENERIC_SCALE (it's currently deprecated in favor of a registry lookup, scheduled for removal no earlier than 1.22) and the plugin fails to load with an Attribute-related error on startup, check for a plugin update or report it on the issue tracker with your exact Paper version.
? Support & Feedback
Found a bug? Have a suggestion? Feel free to:
- Contact me on Discord: igromania_
评论 0
登录后参与评分
还没有评论,来抢沙发吧