Portal Preloader
一个兼容 Folia 的 Minecraft 插件,通过在玩家传送前预加载传送门目的地的区块来减少加载屏幕并改善传送门旅行体验。
功能
- 传送门预加载:自动通过新创建的传送门发射雪球以预生成目的地区块
- 传送门冷却系统:在允许玩家传送之前给予目的地完全加载的时间
- 维度特定冷却时间:为下界和主世界传送门设置不同的冷却时间
- 实时倒计时:等待中的玩家在传送门内每秒都会看到倒计时消息
- 自动计时器重置:当冷却时间结束时,玩家无需离开并重新进入传送门
- 兼容 Folia:完全兼容 Folia 的区域线程机制
- 自定义消息:所有聊天消息均可配置,支持颜色代码
- 重载命令:无需重启服务器即可更新配置
为什么使用此插件?
当玩家通过下界传送门前往未探索区域时,目的地的区块需要被生成。这可能导致:
- 漫长的加载屏幕
- 客户端冻结
- 玩家卡在传送门动画中
- 糟糕的用户体验,尤其是在地形生成复杂的服务器上
Portal Preloader 通过以下方式解决此问题:
- 当下界传送门点燃时立即发射雪球穿过传送门
- 雪球到达目的地并触发区块生成
- 在任何玩家传送之前,区块已被预加载并准备就绪
- 可配置的冷却时间确保区块有足够的时间完全生成
- 玩家体验到平滑、即时的传送,没有加载屏幕
这对于以下情况特别有用:
- 具有自定义地形生成的服务器
- 运行 Folia 的高性能服务器
- 玩家经常探索新区域的archy(无政府)服务器
- 任何希望改善传送门旅行体验的服务器
安装
- 下载最新版本的 JAR 文件
- 将其放入服务器的
plugins 文件夹
- 重启服务器或使用插件管理器加载它
- 在
plugins/PortalPreloader/config.yml 中配置插件
要求
- Minecraft 1.21.x
- Folia 或 Paper 服务器
- Java 21
配置
默认配置 (config.yml)
# Portal Preloader Configuration
# Enable portal cooldown system
# When enabled, players cannot use newly lit portals for a set time
enable-portal-cooldown: true
# Default cooldown for all portals (in seconds)
# This is used when dimension-specific cooldowns are not set or set to -1
portal-cooldown-seconds: 10
# Dimension-specific cooldowns (set to -1 to use default cooldown)
# Overworld portals cooldown (portals lit in the overworld)
overworld-cooldown-seconds: -1
# Nether portals cooldown (portals lit in the nether)
nether-cooldown-seconds: -1
# Messages sent to players
# Use {time} as a placeholder for remaining seconds in cooldown message
# Color codes supported with & (e.g., &c for red, &a for green, &e for yellow)
messages:
# Message sent every second while player waits in a portal on cooldown
cooldown: "&cThis portal is still loading! Please wait {time} seconds."
# Message sent when the portal becomes ready while player is waiting inside
ready: "&aPortal is ready! You can now travel."
# Enable verbose logging for debugging
# Shows detailed information about portal creation, cooldowns, and player interactions
verbose: false
配置选项
| 选项 |
描述 |
默认值 |
enable-portal-cooldown |
启用/禁用冷却系统 |
true |
portal-cooldown-seconds |
默认冷却时间(秒) |
10 |
overworld-cooldown-seconds |
在主世界点燃的传送门的冷却时间(-1 = 使用默认值) |
-1 |
nether-cooldown-seconds |
在下界点燃的传送门的冷却时间(-1 = 使用默认值) |
-1 |
messages.cooldown |
倒计时期间显示的消息(使用 {time} 表示剩余秒数) |
见配置 |
messages.ready |
传送门准备好后显示的消息 |
见配置 |
verbose |
启用详细日志记录以进行调试 |
false |
颜色代码
消息支持使用 & 的 Minecraft 颜色代码:
&0 - 黑色
&1 - 深蓝色
&2 - 深绿色
&3 - 深青色
&4 - 深红色
&5 - 深紫色
&6 - 金色
&7 - 灰色
&8 - 深灰色
&9 - 蓝色
&a - 绿色
&b - 青色
&c - 红色
&d - 浅紫色
&e - 黄色
&f - 白色
命令
| 命令 |
权限 |
描述 |
/portalpreloader |
- |
显示插件版本和帮助信息 |
/portalpreloader reload |
portalpreloader.reload |
重新加载配置 |
别名: /pp, /preloader
权限
| 权限 |
描述 |
默认值 |
portalpreloader.reload |
允许重新加载插件配置 |
op |
工作原理
传送门预加载
- 当下界传送门被火点燃时
- 在传送门中心生成一个雪球
- 雪球立即穿过传送门
- 在任何玩家能够传送之前生成目的地传送门周围的区块
冷却系统
- 创建传送门时,将其置于冷却状态
- 尝试进入的玩家会收到显示剩余时间的消息
- 如果玩家在传送门内等待,他们每秒都会看到倒计时更新
- 当冷却时间结束时,他们的传送门计时器会自动重置
- 然后玩家可以传送而无需离开并重新进入
站在传送门区域内
- 如果玩家已经站在传送门点燃时将出现传送门方块的位置
- 他们会自动获得冷却效果,并且倒计时开始
- 这防止了通过预先定位来绕过系统
Portal Preloader
A Folia-compatible Minecraft plugin that reduces loading screens and improves the portal travel experience by preloading chunks at portal destinations before players teleport.
Features
- Portal Preloading: Automatically spawns a snowball through newly created portals to pre-generate destination chunks
- Portal Cooldown System: Gives the destination time to fully load before allowing players to teleport
- Dimension-Specific Cooldowns: Set different cooldown times for Overworld and Nether portals
- Live Countdown: Players waiting in a portal see a countdown message every second
- Automatic Timer Reset: When cooldown expires, players don't need to leave and re-enter the portal
- Folia Compatible: Fully compatible with Folia's region-based threading
- Customizable Messages: All chat messages are configurable with color code support
- Reload Command: Update configuration without restarting the server
Why Use This Plugin?
When players travel through nether portals to unexplored areas, the destination chunks need to be generated. This can cause:
- Long loading screens
- Client freezing
- Players getting stuck in the portal animation
- Poor user experience, especially on servers with complex terrain generation
Portal Preloader solves this by:
- Spawning a snowball through the portal immediately when it's lit
- The snowball travels to the destination and triggers chunk generation
- Chunks are pre-loaded and ready before any player teleports
- The configurable cooldown ensures chunks have time to fully generate
- Players experience smooth, instant teleportation with no loading screen
This is especially useful for:
- Servers with custom terrain generation
- High-performance servers running Folia
- Anarchy servers where players frequently explore new areas
- Any server wanting to improve the portal travel experience
Installation
- Download the latest release JAR file
- Place it in your server's
plugins folder
- Restart your server or use a plugin manager to load it
- Configure the plugin in
plugins/PortalPreloader/config.yml
Requirements
- Minecraft 1.21.x
- Folia or Paper server
- Java 21
Configuration
Default Config (config.yml)
# Portal Preloader Configuration
# Enable portal cooldown system
# When enabled, players cannot use newly lit portals for a set time
enable-portal-cooldown: true
# Default cooldown for all portals (in seconds)
# This is used when dimension-specific cooldowns are not set or set to -1
portal-cooldown-seconds: 10
# Dimension-specific cooldowns (set to -1 to use default cooldown)
# Overworld portals cooldown (portals lit in the overworld)
overworld-cooldown-seconds: -1
# Nether portals cooldown (portals lit in the nether)
nether-cooldown-seconds: -1
# Messages sent to players
# Use {time} as a placeholder for remaining seconds in cooldown message
# Color codes supported with & (e.g., &c for red, &a for green, &e for yellow)
messages:
# Message sent every second while player waits in a portal on cooldown
cooldown: "&cThis portal is still loading! Please wait {time} seconds."
# Message sent when the portal becomes ready while player is waiting inside
ready: "&aPortal is ready! You can now travel."
# Enable verbose logging for debugging
# Shows detailed information about portal creation, cooldowns, and player interactions
verbose: false
Configuration Options
| Option |
Description |
Default |
enable-portal-cooldown |
Enable/disable the cooldown system |
true |
portal-cooldown-seconds |
Default cooldown time in seconds |
10 |
overworld-cooldown-seconds |
Cooldown for portals lit in the Overworld (-1 = use default) |
-1 |
nether-cooldown-seconds |
Cooldown for portals lit in the Nether (-1 = use default) |
-1 |
messages.cooldown |
Message shown during countdown (use {time} for seconds remaining) |
See config |
messages.ready |
Message shown when portal becomes ready |
See config |
verbose |
Enable detailed logging for debugging |
false |
Color Codes
Messages support Minecraft color codes using &:
&0 - Black
&1 - Dark Blue
&2 - Dark Green
&3 - Dark Aqua
&4 - Dark Red
&5 - Dark Purple
&6 - Gold
&7 - Gray
&8 - Dark Gray
&9 - Blue
&a - Green
&b - Aqua
&c - Red
&d - Light Purple
&e - Yellow
&f - White
Commands
| Command |
Permission |
Description |
/portalpreloader |
- |
Shows plugin version and help |
/portalpreloader reload |
portalpreloader.reload |
Reloads the configuration |
Aliases: /pp, /preloader
Permissions
| Permission |
Description |
Default |
portalpreloader.reload |
Allows reloading the plugin configuration |
op |
How It Works
Portal Preloading
- When a nether portal is lit with fire
- A snowball is spawned in the center of the portal
- The snowball immediately goes through the portal
- This generates the destination portal before any player can teleport
Cooldown System
- When a portal is created, it's placed on cooldown
- Players attempting to enter get a message showing remaining time
- If a player waits inside the portal, they see countdown updates every second
- When the cooldown expires, their portal timer automatically resets
- Players can then teleport without leaving and re-entering
Standing in Portal Area
- If a player is already standing where portal blocks will appear when it's lit
- They automatically get the cooldown and countdown starts
- This prevents bypassing the system by pre-positioning
License
This project is provided as-is for use on Minecraft servers.
评论 0
登录后参与评分
还没有评论,来抢沙发吧