TPHandler
版本 2.1.0 · Paper/Purpur 26.3 · Java 25
一款适用于生存和 PvP 服务器的传送管理插件。TPHandler 整合了单人永久家、带有两阶段预热和 BossBar 的完整 TPA 请求系统,以及可选的一次性付费死亡箱回城功能。经济、战斗和死亡箱行为均为可选集成,因此该插件可独立运行,并随你已运行的其他插件逐步扩展功能。
功能特性
- 家 (Homes) — 每位玩家一个家,支持
/sethome、/home 和 /delhome。前几次使用 /sethome 是免费的;此后每次重新设置家可能需要花费金钱(可配置)。
- TPA 请求 —
/tpa、/tpaccept、/tpdeny、/tpcancel,具有清晰的两阶段流程:接受倒计时,随后是预热阶段,在此期间请求者必须保持静止。
- 可靠的预热机制 — 移动、受伤或进入战斗状态时,传送会被取消。反馈通过动作栏或可配置的 BossBar 显示。
- 死亡箱传送 — 当玩家死亡并生成死亡箱时,可提供一次性付费回传至死亡箱的功能,包含过期窗口和死后延迟。
- 双经济系统(可选) — MultiBank(主用,异步)或 Vault(备用)。如果未安装经济插件,费用将自动不生效。
- 战斗感知 — 安装了 CombatLog 时,传送会尊重战斗标签,防止玩家通过传送逃避战斗。
- 玩家个人语言 — 支持英语、葡萄牙语和法语,若 PlayerSettings 存在则优先选择玩家设定的区域设置。
- 绕过权限 — 提供细粒度的节点以绕过预热、费用、战斗检查和冷却时间,另设全局开关以禁用所有绕过功能(确保管理员共享普通玩家的体验)。
- SQLite 存储 — 家的数据本地持久化;所有数据库访问均在专用线程上串行执行,以确保可靠性。
命令
| 命令 |
描述 |
权限 |
/home |
传送至你的家 |
tphandler.home |
/sethome |
设置你的家位置 |
tphandler.sethome |
/delhome |
删除你的家位置 |
tphandler.delhome |
/tpa <player> |
向玩家发送传送请求 |
tphandler.tpa |
/tpa cancel / /tpcancel |
取消当前的活跃传送请求 |
tphandler.tpa |
/tpaccept |
接受待处理的传送请求 |
tphandler.tpaccept |
/tpdeny |
拒绝待处理的传送请求 |
tphandler.tpdeny |
/deathchest tp |
传送至你的死亡箱 |
tphandler.deathchest |
/tph dc |
死亡箱传送备用命令(/tphandler 的别名) |
tphandler.deathchest |
/tphandler reload |
重载配置文件 |
tphandler.admin |
别名:/tph 对应 /tphandler。
权限
| 节点 |
描述 |
默认值 |
tphandler.home |
允许使用 /home |
true |
tphandler.sethome |
允许使用 /sethome |
true |
tphandler.delhome |
允许使用 /delhome |
true |
tphandler.tpa |
允许使用 /tpa 和 /tpcancel |
true |
tphandler.tpaccept |
允许使用 /tpaccept |
true |
tphandler.tpdeny |
允许使用 /tpdeny |
true |
tphandler.deathchest |
允许使用 /deathchest tp 和 /tph dc |
true |
tphandler.admin |
访问 /tphandler 管理命令 |
op |
tphandler.bypass.warmup |
绕过传送预热 |
op |
tphandler.bypass.cost |
绕过传送费用(包括死亡箱) |
op |
tphandler.bypass.combat |
绕过战斗检查 |
op |
tphandler.bypass.cooldown |
绕过 TPA 冷却时间 |
op |
配置
完整的 config.yml 将在首次运行时自动生成。主要部分如下:
# 语言: en_US, pt_PT 或 fr_FR (默认为 pt_PT;可通过 PlayerSettings 按玩家设置)
locale: "pt_PT"
# 双经济系统: MultiBank (主用) 和 Vault (备用)。
# AUTO 会从优先级列表中选取第一个可用的提供者。
economy:
mode: AUTO
priority: ["MULTIBANK", "VAULT"]
teleport:
warmup-seconds: 5
cancel-on-move: true
cancel-on-damage: true
cancel-on-combat: true
feedback:
mode: "ACTIONBAR" # CHAT, ACTIONBAR, BOSSBAR, NONE
# 设置为 false 以禁用所有绕过权限,即使对 OP 也无效。
bypass:
enabled: true
home:
enabled: true
sethome:
free-sets: 5
cost-after-free: 250.0
tpa:
enabled: true
cost: 400.0
request-timeout-seconds: 60
cooldown-seconds: 10
charge-on-request: false # 否则在 /tpaccept 时收费
refund-on-deny: true
accept-countdown-seconds: 3
warmup-seconds: 5
# 需要 DeathChest 插件。
deathchestTeleport:
enabled: true
cost: 2000.0
offerExpiryMinutes: 20
postDeathWaitSeconds: 60
restrictions:
# 默认保持为 true,以便被标记的玩家无法一键逃离战斗。
requireNotInCombat: true
warmupSeconds: 0
storage:
database: "tphandler.db"
值得注意的配置项:
economy.mode — 可为 AUTO、MULTIBANK 或 VAULT。AUTO 会根据 priority 顺序选择。
home.sethome.free-sets / cost-after-free — 玩家在重新设置家开始产生费用之前,可以免费使用多少次 /sethome。
tpa.charge-on-request — 在发送请求时收费(并在拒绝/超时后退款),还是仅在请求被接受时收费。
deathchestTeleport.restrictions.requireNotInCombat — 建议保持 true;死亡箱传送是瞬发的,如果在战斗中允许它,将被标记的玩家用来逃避战斗。
安装
- 需要 Paper 或 Purpur 26.3 以及 Java 25(2.0.0 版本运行于 26.2,1.x 版本运行于 1.21.x)。
- 将
TPHandler-2.0.0.jar 放入服务器的 plugins/ 文件夹中。
- (可选)安装以下任意集成插件以启用额外功能。
- 启动服务器,然后编辑
plugins/TPHandler/config.yml 并运行 /tph reload。
依赖关系
所有集成均为可选(软依赖)——TPHandler 无需任何依赖即可运行:
- MultiBank 或 Vault —— 用于家庭传送、TPA 和死亡箱子费用的经济系统。如果没有经济插件支持,这些费用将被跳过。
- CombatLog —— 战斗标记功能,确保传送时尊重战斗状态。
- DeathChest —— 启用付费的一次性死亡箱子传送功能。
- PlayerSettings —— 每个玩家的语言选择设置。
支持 / 源码
源代码:
TPHandler
Version 2.1.0 · Paper/Purpur 26.3 · Java 25
A teleport management plugin for survival and PvP servers. TPHandler bundles a single
per-player home, a full TPA request system with two-phase warm-up and BossBars, and an
optional paid one-time teleport back to your death chest. Economy, combat and death-chest
behaviour are all optional integrations, so the plugin works standalone and grows with the
plugins you already run.
Features
- Homes — one home per player with
/sethome, /home and /delhome. The first few
/sethome uses are free; after that each re-set can cost money (configurable).
- TPA requests —
/tpa, /tpaccept, /tpdeny, /tpcancel with a clean two-phase flow:
an accept countdown, then a warm-up during which the requester must stand still.
- Warm-up you can trust — teleports can cancel on move, on damage or on entering combat.
Feedback is shown via action bar or a configurable BossBar.
- Death-chest teleport — when a player dies and a death chest is created, they can be
offered a paid one-time teleport back to it, with an expiry window and post-death delay.
- Dual economy, optional — MultiBank (primary, async) or Vault (fallback). If no economy
is installed, costs simply do not apply.
- Combat aware — with CombatLog installed, teleports respect combat tags so players cannot
escape a fight by teleporting.
- Per-player language — English, Portuguese and French, with PlayerSettings picking the
player's chosen locale when present.
- Bypass permissions — fine-grained nodes to bypass warm-up, cost, combat and cooldown,
plus a global switch to disable all bypasses (so operators share the normal experience).
- SQLite storage — homes are persisted locally; all database access is serialized on a
dedicated thread for reliability.
Commands
| Command |
Description |
Permission |
/home |
Teleport to your home |
tphandler.home |
/sethome |
Set your home location |
tphandler.sethome |
/delhome |
Delete your home location |
tphandler.delhome |
/tpa <player> |
Send a teleport request to a player |
tphandler.tpa |
/tpa cancel / /tpcancel |
Cancel your active teleport request |
tphandler.tpa |
/tpaccept |
Accept a pending teleport request |
tphandler.tpaccept |
/tpdeny |
Deny a pending teleport request |
tphandler.tpdeny |
/deathchest tp |
Teleport to your death chest |
tphandler.deathchest |
/tph dc |
Death-chest teleport fallback (alias of /tphandler) |
tphandler.deathchest |
/tphandler reload |
Reload the configuration |
tphandler.admin |
Aliases: /tph for /tphandler.
Permissions
| Node |
Description |
Default |
tphandler.home |
Allows /home |
true |
tphandler.sethome |
Allows /sethome |
true |
tphandler.delhome |
Allows /delhome |
true |
tphandler.tpa |
Allows /tpa and /tpcancel |
true |
tphandler.tpaccept |
Allows /tpaccept |
true |
tphandler.tpdeny |
Allows /tpdeny |
true |
tphandler.deathchest |
Allows /deathchest tp and /tph dc |
true |
tphandler.admin |
Access to /tphandler admin commands |
op |
tphandler.bypass.warmup |
Bypass teleport warm-up |
op |
tphandler.bypass.cost |
Bypass teleport costs (including death chest) |
op |
tphandler.bypass.combat |
Bypass combat checks |
op |
tphandler.bypass.cooldown |
Bypass TPA cooldown |
op |
Configuration
The full config.yml is generated on first run. Key sections:
# Language: en_US, pt_PT or fr_FR (ships as pt_PT; per-player via PlayerSettings)
locale: "pt_PT"
# Dual economy: MultiBank (primary) and Vault (fallback).
# AUTO picks the first available provider from the priority list.
economy:
mode: AUTO
priority: ["MULTIBANK", "VAULT"]
teleport:
warmup-seconds: 5
cancel-on-move: true
cancel-on-damage: true
cancel-on-combat: true
feedback:
mode: "ACTIONBAR" # CHAT, ACTIONBAR, BOSSBAR, NONE
# Set to false to disable ALL bypass permissions even for OPs.
bypass:
enabled: true
home:
enabled: true
sethome:
free-sets: 5
cost-after-free: 250.0
tpa:
enabled: true
cost: 400.0
request-timeout-seconds: 60
cooldown-seconds: 10
charge-on-request: false # otherwise charges on /tpaccept
refund-on-deny: true
accept-countdown-seconds: 3
warmup-seconds: 5
# Requires the DeathChest plugin.
deathchestTeleport:
enabled: true
cost: 2000.0
offerExpiryMinutes: 20
postDeathWaitSeconds: 60
restrictions:
# Kept true by default so a tagged player cannot escape combat with one click.
requireNotInCombat: true
warmupSeconds: 0
storage:
database: "tphandler.db"
Notable keys:
economy.mode — AUTO, MULTIBANK or VAULT. AUTO uses priority order.
home.sethome.free-sets / cost-after-free — how many free /sethome uses each player
gets before re-setting a home starts costing money.
tpa.charge-on-request — charge (and refund on deny/timeout) when the request is sent,
or charge only when it is accepted.
deathchestTeleport.restrictions.requireNotInCombat — leave true; the death-chest
teleport is instant, so allowing it in combat would let tagged players escape a fight.
Installation
- Requires Paper or Purpur 26.3 and Java 25 (2.0.0 runs on 26.2, 1.x on 1.21.x).
- Drop
TPHandler-2.0.0.jar into your server's plugins/ folder.
- (Optional) Install any of the integrations below for the extra features.
- Start the server, then edit
plugins/TPHandler/config.yml and run /tph reload.
Dependencies
All integrations are optional (soft dependencies) — TPHandler runs without any of them:
- MultiBank or Vault — economy for home / TPA / death-chest costs. Without an economy
provider, those costs are skipped.
- CombatLog — combat tagging so teleports respect combat state.
- DeathChest — enables the paid one-time death-chest teleport.
- PlayerSettings — per-player language selection.
Support / Source
Source code:
评论 0
登录后参与评分
还没有评论,来抢沙发吧