TPHandler

插件

· 作者 roguiii

适用于 Paper/Purpur 的传送管理功能:设置家园、带有热身时间和 BossBar 显示的 TPA 请求,以及付费的一次性死亡箱子传送。可选集成 MultiBank/Vault 经济系统、CombatLog 和 DeathChest 插件。

0 本站下载 0 关注 更新于 1 个月前

最新 2.1.0+mc26.3 · 26.3 · Paper / Purpur

一键开服(送7天)

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;死亡箱传送是瞬发的,如果在战斗中允许它,将被标记的玩家用来逃避战斗。

安装

  1. 需要 Paper 或 Purpur 26.3 以及 Java 25(2.0.0 版本运行于 26.2,1.x 版本运行于 1.21.x)。
  2. 将 TPHandler-2.0.0.jar 放入服务器的 plugins/ 文件夹中。
  3. (可选)安装以下任意集成插件以启用额外功能。
  4. 启动服务器,然后编辑 plugins/TPHandler/config.yml 并运行 /tph reload。

依赖关系

所有集成均为可选(软依赖)——TPHandler 无需任何依赖即可运行:

  • MultiBank 或 Vault —— 用于家庭传送、TPA 和死亡箱子费用的经济系统。如果没有经济插件支持,这些费用将被跳过。
  • CombatLog —— 战斗标记功能,确保传送时尊重战斗状态。
  • DeathChest —— 启用付费的一次性死亡箱子传送功能。
  • PlayerSettings —— 每个玩家的语言选择设置。

支持 / 源码

源代码:

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源