? P_Randomtp
面向 Paper/Spigot 1.21+ 服务器的优化版**随机传送 (RTP)**插件。
允许玩家安全地传送到世界中的随机位置,避免卡顿和常见 RTP 插件的问题。
✨ 功能特性
- ? 安全的随机传送 – 避开液体、危险方块和下界天花板。
- ? 自适应半径 – 若未找到有效地点,自动扩大搜索区域。
- ⚡ 按 tick 分片搜索 – 将尝试分散到各个 tick 执行,防止服务器卡死。
- ? 异步区块加载 – 即使距离很远也能保证快速 RTP。
- ?️ WorldGuard 集成(可选)– 尊重受保护的区域。
- ? Vault 集成(可选)– 针对不同世界收取自定义费用。
- ⏳ 预热、冷却时间与权限等级 – 灵活设置以平衡使用频率。
- ? 多语言支持 (pt_br, en_us) – 可根据语言自定义消息或在
config.yml 中强制指定。
? 安装
- 下载该插件编译好的
.jar 文件。
- 将其放入 Paper 1.21+ 服务器的
plugins/ 文件夹中。
- 重启服务器以生成配置文件。
- 根据需要编辑
config.yml。
- (可选)安装 Vault 以收取 RTP 费用,并安装 WorldGuard 以尊重区域保护。
⚙️ 配置
config.yml 文件包含多种选项。
以下是优化配置的示例片段:
settings:
cooldown-seconds: 60
warmup-seconds: 3
per-tick-attempts: 6
loaded-chunks-only: false
allow-chunk-load: true
async-chunk-loads-parallel: 8
max-attempts: 120
adaptive-radius:
enabled: true
step-percent: 25
max-multiplier: 3.0
| 权限 |
描述 |
默认值 |
prandomtp.use |
允许使用 /rtp |
✅ 所有玩家 |
prandomtp.bypass |
忽略冷却时间 |
❌ 仅限 OP |
prandomtp.free |
免费使用 RTP(无需 Vault 付费) |
❌ 仅限 OP |
prandomtp.world.* |
允许通过 /rtp 选择任意世界 |
❌ 仅限 OP |
prandomtp.admin |
拥有 /rtp reload 命令的访问权限 |
❌ 仅限 OP |
prandomtp.tier.vip |
自定义等级(更短的冷却时间,更大的半径) |
❌ 仅限 VIP |
prandomtp.tier.legend |
自定义等级(极短的冷却时间,更大的半径) |
❌ 仅限 Legend |
| 命令 |
用法 |
描述 |
/rtp |
/rtp |
传送到当前世界的随机位置 |
/rtp <mundo> |
/rtp world_nether |
传送到其他世界(如果允许) |
/rtp reload |
/rtp reload |
重新加载配置和消息 |
? 集成
? 公共 API(供其他插件使用)
-
可通过 ServicesManager 访问接口:
-
RtpService service = Bukkit.getServicesManager().load(RtpService.class);
-
// 查找安全的位置
Location safe = service.findSafeLocation(player, world);
-
// 请求完整的 RTP(如同执行 /rtp 命令)
service.requestRtp(player, world);
-
可用的事件 (RtpEvents):
-
WarmupStartEvent
-
WarmupCancelEvent
-
SuccessEvent
-
FailEvent
? 优化建议
-
启用 allow-chunk-load: true 并根据硬件调整 async-chunk-loads-parallel。
-
调整 per-tick-attempts(4–8 为理想值)。
-
使用 adaptive-radius 以减少种子中存在大量海洋时的失败率。
-
如果是高并发玩家服务器,请限制并发 RTP 数量(使用全局信号量)。
❓ 常见问题
❓ - RTP 在存在大量海洋的世界中失败怎么办?
启用 adaptive-radius 并增加 max-attempts 以允许扩展至海洋之外。
❓ - 当玩家从 2000 格外使用 RTP 时会导致卡顿。
确保你使用的是 Paper 1.21+ 服务器,并启用 allow-chunk-load: true。加载过程是异步的,不会阻塞主线程 tick。
❓ - 如何添加更多语言?
在 plugins/P_Randomtp/idiomas/ 目录下创建以语言代码命名的文件,例如:es_es.yml。
❓ - 我可以在特定世界中禁用 RTP 吗?
可以,在 config.yml 中配置 worlds.<name>.allow: false。
? bStats
?? 作者
- 由 Pedro 开发。欢迎提供建议、报告错误或提交 PR!
config.yml 文件包含若干选项。
优化配置示例(片段):
settings:
cooldown-seconds: 60
warmup-seconds: 3
per-tick-attempts: 6
loaded-chunks-only: false
allow-chunk-load: true
async-chunk-loads-parallel: 8
max-attempts: 120
adaptive-radius:
enabled: true
step-percent: 25
max-multiplier: 3.0
? 权限
| 权限 |
描述 |
默认值 |
prandomtp.use |
允许使用 /rtp |
✅ 所有人 |
prandomtp.bypass |
忽略冷却时间 |
❌ 仅限 OP |
prandomtp.free |
免费 RTP(Vault) |
❌ 仅限 OP |
prandomtp.world.* |
允许通过 /rtp 传送至任意世界 |
❌ 仅限 OP |
prandomtp.admin |
访问 /rtp reload |
❌ 仅限 OP |
prandomtp.tier.vip |
自定义等级(更短冷却、更大半径) |
❌ 仅限 VIP |
prandomtp.tier.legend |
自定义等级(大幅缩短冷却、超大半径) |
❌ Legend |
⌨️ 命令
| 命令 |
用法 |
描述 |
/rtp |
/rtp |
传送到当前世界的随机位置 |
/rtp <world> |
/rtp world_nether |
传送到其他世界(若允许) |
/rtp reload |
/rtp reload |
重新加载配置和消息 |
? 集成
- Vault – 按世界收取配置的费用(
economy.cost.per-world)。
- WorldGuard – 阻止传送到受保护的区域。
- bStats – 发送匿名指标数据(可选)。
? 公共 API(供其他插件使用)
可通过 ServicesManager 获取:
RtpService service = Bukkit.getServicesManager().load(RtpService.class);
// 查找安全的位置
Location safe = service.findSafeLocation(player, world);
// 请求完整 RTP(等同于 /rtp)
service.requestRtp(player, world);
? 事件 (RtpEvents)
WarmupStartEvent
WarmupCancelEvent
SuccessEvent
FailEvent
? 优化
- 启用
allow-chunk-load: true,并根据你的硬件调整 async-chunk-loads-parallel。
- 调整
per-tick-attempts(4–8 为理想值)。
- 使用
adaptive-radius 以减少在拥有大面积海洋的种子中的失败率。
- 对于玩家数量较多的高负载服务器,限制并发的 RTP 次数(使用全局信号量)。
❓ 常见问题
❓ 在世界中因海洋过多导致 RTP 失败,该怎么办?
启用 adaptive-radius 并增加 max-attempts 以扩大搜索范围,超越海洋区域。
❓ 当玩家传送到 2000+ 格之外时出现卡顿。
请确保你使用的是 Paper 1.21+ 并启用 allow-chunk-load: true。
区块加载是异步进行的,不会冻结主线程 tick。
❓ 如何添加更多语言?
在 plugins/P_Randomtp/languages/ 目录下创建语言文件,文件名使用语言代码,例如 es_es.yml。
❓ 我可以在特定世界中禁用 RTP 吗?
可以,在 config.yml 中设置 worlds.<name>.allow: false。
? bStats
(可选)通过 bStats 收集匿名指标数据。
?? 作者
- 由 Pedro 开发。欢迎提供建议、Bug 报告和 PR!
? P_Randomtp
Plugin de Random Teleport (RTP) otimizado para servidores Paper/Spigot 1.21+.
Permite que jogadores se teleportem para locais aleatórios seguros em um mundo, evitando lag e falhas típicas de plugins de RTP.
✨ Recursos
- ? Teleporte Aleatório Seguro – evita líquidos, blocos perigosos e tetos do Nether.
- ? Raio adaptativo – expande automaticamente a área de busca se não encontrar local válido.
- ⚡ Busca fatiada por tick – executa tentativas de forma distribuída, sem travar o servidor.
- ? Carregamento assíncrono de chunks – garante RTP rápido mesmo em distâncias grandes.
- ?️ Integração com WorldGuard (opcional) – respeita regiões protegidas.
- ? Integração com Vault (opcional) – cobra valores customizados por mundo.
- ⏳ Warmup, cooldown e tiers por permissão – configurações flexíveis para balancear o uso.
- ? Multi-idioma (pt_br, en_us) – mensagens personalizadas por idioma ou forçadas no
config.yml.
? Instalação
- Baixe o arquivo
.jar compilado do plugin.
- Coloque em
plugins/ no seu servidor Paper 1.21+.
- Reinicie o servidor para gerar os arquivos de configuração.
- Edite
config.yml conforme necessário.
- (Opcional) Instale Vault para cobrar por RTP e WorldGuard para respeitar proteções.
⚙️ Configuração
O arquivo config.yml possui várias opções.
Exemplo de configuração otimizada (trecho):
settings:
cooldown-seconds: 60
warmup-seconds: 3
per-tick-attempts: 6
loaded-chunks-only: false
allow-chunk-load: true
async-chunk-loads-parallel: 8
max-attempts: 120
adaptive-radius:
enabled: true
step-percent: 25
max-multiplier: 3.0
| Permissão |
Descrição |
Default |
prandomtp.use |
Permite usar /rtp |
✅ todos |
prandomtp.bypass |
Ignora cooldown |
❌ apenas OP |
prandomtp.free |
Usa RTP sem custo (Vault) |
❌ apenas OP |
prandomtp.world.* |
Permite selecionar qualquer mundo com /rtp |
❌ apenas OP |
prandomtp.admin |
Acesso ao /rtp reload |
❌ apenas OP |
prandomtp.tier.vip |
Tier customizado (cooldown menor, +raio) |
❌ apenas VIP |
prandomtp.tier.legend |
Tier customizado (cooldown muito menor, +raio) |
❌ apenas Legend |
| Comando |
Uso |
Descrição |
/rtp |
/rtp |
Teleporta para um local aleatório no mundo atual |
/rtp <mundo> |
/rtp world_nether |
Teleporta para outro mundo (se permitido) |
/rtp reload |
/rtp reload |
Recarrega a configuração e mensagens |
? Integrações
-
Vault – cobra valor configurado por mundo (economy.cost.per-world).
-
WorldGuard – impede teleporte em áreas protegidas.
-
bStats – envia métricas anônimas (opcional).
? API Pública (para outros plugins)
-
Interface disponível via ServicesManager:
-
RtpService service = Bukkit.getServicesManager().load(RtpService.class);
-
// Encontrar um local seguro
Location safe = service.findSafeLocation(player, world);
-
// Solicitar RTP completo (como se fosse /rtp)
service.requestRtp(player, world);
-
Eventos disponíveis (RtpEvents):
-
WarmupStartEvent
-
WarmupCancelEvent
-
SuccessEvent
-
FailEvent
? Otimização
-
Use allow-chunk-load: true e async-chunk-loads-parallel ajustado conforme o hardware.
-
Ajuste per-tick-attempts (4–8 é ideal).
-
Use adaptive-radius para reduzir falhas em seeds com muitos oceanos.
-
Se for servidor com muito player simultâneo, limite RTPs concorrentes (semáforo global).
❓ FAQ
❓ - O RTP falha em mundos com muito oceano, e agora?
Ative adaptive-radius e aumente max-attempts para permitir expandir além dos oceanos.
❓ - Dá lag quando o jogador usa RTP de 2000 blocos.
Certifique-se de estar no Paper 1.21+ e habilite allow-chunk-load: true. O carregamento é assíncrono, não trava o tick.
❓ - Como adicionar mais idiomas?
Crie arquivos em plugins/P_Randomtp/idiomas/ com o código da língua, ex.: es_es.yml.
❓ - Posso desativar RTP em mundos específicos?
Sim, configure worlds.<nome>.allow: false no config.yml.
? bStats
?? Autor
- Desenvolvido por Pedro. Sugestões, bugs ou PRs são bem-vindos!
? P_Randomtp
An optimized Random Teleport (RTP) plugin for Paper/Spigot 1.21+ servers.
Allows players to safely teleport to random locations in a world, avoiding lag and common RTP plugin issues.
✨ Features
- ? Safe Random Teleport – avoids liquids, dangerous blocks, and Nether ceilings.
- ? Adaptive radius – automatically expands the search area if no valid spot is found.
- ⚡ Per-tick sliced search – spreads attempts across ticks to avoid server freezes.
- ? Asynchronous chunk loading – ensures fast RTP even at large distances.
- ?️ WorldGuard integration (optional) – respects protected regions.
- ? Vault integration (optional) – charge custom prices per world.
- ⏳ Warmup, cooldown, and permission tiers – flexible settings to balance usage.
- ? Multi-language (pt_br, en_us) – customizable messages per language or forced in
config.yml.
? Installation
- Download the compiled
.jar file of the plugin.
- Place it inside the
plugins/ folder of your Paper 1.21+ server.
- Restart the server to generate the configuration files.
- Edit
config.yml as needed.
- (Optional) Install Vault to charge for RTP and WorldGuard to respect protections.
⚙️ Configuration
The config.yml file contains several options.
Example of an optimized setup (snippet):
settings:
cooldown-seconds: 60
warmup-seconds: 3
per-tick-attempts: 6
loaded-chunks-only: false
allow-chunk-load: true
async-chunk-loads-parallel: 8
max-attempts: 120
adaptive-radius:
enabled: true
step-percent: 25
max-multiplier: 3.0
? Permissions
| Permission |
Description |
Default |
prandomtp.use |
Allows using /rtp |
✅ everyone |
prandomtp.bypass |
Ignores cooldown |
❌ OP only |
prandomtp.free |
RTP without cost (Vault) |
❌ OP only |
prandomtp.world.* |
Allows teleporting to any world with /rtp |
❌ OP only |
prandomtp.admin |
Access to /rtp reload |
❌ OP only |
prandomtp.tier.vip |
Custom tier (shorter cooldown, larger radius) |
❌ VIP only |
prandomtp.tier.legend |
Custom tier (much shorter cooldown, big radius) |
❌ Legend |
⌨️ Commands
| Command |
Usage |
Description |
/rtp |
/rtp |
Teleports to a random location in the current world |
/rtp <world> |
/rtp world_nether |
Teleports to another world (if allowed) |
/rtp reload |
/rtp reload |
Reloads configuration and messages |
? Integrations
- Vault – charges configured cost per world (
economy.cost.per-world).
- WorldGuard – prevents teleportation into protected regions.
- bStats – sends anonymous metrics (optional).
? Public API (for other plugins)
Available through ServicesManager:
RtpService service = Bukkit.getServicesManager().load(RtpService.class);
// Find a safe location
Location safe = service.findSafeLocation(player, world);
// Request a full RTP (same as /rtp)
service.requestRtp(player, world);
? Events (RtpEvents)
WarmupStartEvent
WarmupCancelEvent
SuccessEvent
FailEvent
? Optimization
- Use
allow-chunk-load: true and tune async-chunk-loads-parallel according to your hardware.
- Adjust
per-tick-attempts (4–8 is ideal).
- Use
adaptive-radius to reduce failures on seeds with large oceans.
- For high player count servers, limit concurrent RTPs (global semaphore).
❓ FAQ
❓ RTP fails in worlds with too many oceans, what now?
Enable adaptive-radius and increase max-attempts to expand beyond oceans.
❓ There's lag when players RTP 2000+ blocks away.
Make sure you are on Paper 1.21+ and enable allow-chunk-load: true.
Loading is asynchronous and will not freeze the main tick.
❓ How to add more languages?
Create files in plugins/P_Randomtp/languages/ with the language code, e.g. es_es.yml.
❓ Can I disable RTP in specific worlds?
Yes, set worlds.<name>.allow: false in config.yml.
? bStats
(Optional) Anonymous metrics are collected via bStats.
?? Author
- Developed by Pedro. Suggestions, bug reports, and PRs are welcome!
评论 0
登录后参与评分
还没有评论,来抢沙发吧