YuTeleport PlaceholderAPI
安装 PlaceholderAPI 且 integrations.placeholderapi.enabled: true 时,插件注册标识符 yuteleport。变量只读取快照,不主动加载区块或触发传送流程。唯一例外是 %yuteleport_can_afford%,它会安全读取经济余额,经济插件拒绝查询时返回空字符串。
全局变量
| 变量 | 返回值 |
|---|---|
%yuteleport_version% | 插件版本。 |
%yuteleport_platform% | bukkit 或 folia。 |
%yuteleport_default_language% | 实际生效的默认语言。 |
%yuteleport_search_mode% | 有效搜索模式:folia、async 或 sync。 |
%yuteleport_precache_enabled% | 安全落点预缓存是否启用。 |
%yuteleport_countdown_channels% | 倒计时通道摘要,例如 chat+bossbar。 |
%yuteleport_wait_seconds% | 默认等待秒数。 |
%yuteleport_economy_enabled% | 经济扣费是否启用。 |
%yuteleport_random_enabled% | 随机传送模块是否启用。 |
%yuteleport_warp_enabled% | warp 模块是否启用。 |
%yuteleport_home_enabled% | home 模块是否启用。 |
%yuteleport_tpa_enabled% | tpa 模块是否启用。 |
%yuteleport_share_enabled% | 坐标分享模块是否启用。 |
%yuteleport_back_enabled% | back 模块是否启用。 |
%yuteleport_warp_public_enabled% | 公开 warp 是否启用。 |
%yuteleport_home_public_enabled% | 公开 home 是否启用。 |
%yuteleport_warp_count% | 全部已配置 warp 数量。 |
%yuteleport_public_warp_count% | 全部公开 warp 数量。 |
%yuteleport_public_home_count% | 当前在线玩家公开 home 数量。 |
%yuteleport_total_success% | 本次启动以来成功次数。 |
%yuteleport_total_failed% | 本次启动以来失败次数。 |
%yuteleport_total_cancelled% | 本次启动以来取消次数。 |
%yuteleport_total_requests% | 成功、失败、取消的总和。 |
%yuteleport_success_rate% | 全局成功率百分比,无数据时为 100。 |
玩家状态变量
这些变量支持离线 UUID 快照,玩家离线后仍可返回冷却、状态和最近位置等数据。
| 变量 | 返回值 |
|---|---|
%yuteleport_cooldown% | 剩余随机传送冷却秒数,向上取整。 |
%yuteleport_cooldown_ms% | 剩余随机传送冷却毫秒数。 |
%yuteleport_cooldown_formatted% | 1h 2m 3s 格式的剩余冷却。 |
%yuteleport_cooldown_total% | 当前玩家有效随机传送冷却总时长。 |
%yuteleport_cooldown_progress% | 冷却恢复进度,范围 0-100。 |
%yuteleport_cooldown_bar% | 十段文本进度条。 |
%yuteleport_ready% | 无冷却且无待处理请求时为 true。 |
%yuteleport_pending% | 正在等待、搜索或执行时为 true。 |
%yuteleport_status% | 当前或最近的 TeleportStatus 小写值。 |
%yuteleport_type% | 当前或最近的 TeleportType,例如 random、warp、home、tpa、share、back。 |
%yuteleport_last_type% | 最近记录的传送类型。 |
%yuteleport_last_world% | 最近目的地世界名。 |
%yuteleport_last_x%、%yuteleport_last_y%、%yuteleport_last_z% | 最近目的地坐标。 |
%yuteleport_last_updated% | 快照更新时间,Unix 毫秒。 |
%yuteleport_has_last_location% | 是否存在最近目的地快照。 |
%yuteleport_player_success% | 该玩家本次启动以来成功次数。 |
%yuteleport_player_failed% | 该玩家本次启动以来失败次数。 |
%yuteleport_player_cancelled% | 该玩家本次启动以来取消次数。 |
分类型冷却
| 变量 | 返回值 |
|---|---|
%yuteleport_cooldown_random% | 随机传送冷却秒数。 |
%yuteleport_cooldown_warp% | warp 冷却秒数。 |
%yuteleport_cooldown_home% | home 冷却秒数。 |
%yuteleport_cooldown_tpa% | tpa 冷却秒数。 |
%yuteleport_cooldown_share% | 坐标分享传送冷却秒数。 |
%yuteleport_cooldown_back% | back 冷却秒数。 |
%yuteleport_cooldown_<type>_ms% | 指定类型冷却毫秒数。 |
%yuteleport_cooldown_<type>_formatted% | 指定类型冷却格式化文本。 |
<type> 可写 random、warp、home、tpa、share、back。
在线玩家上下文
这些变量需要玩家在线;离线时返回空字符串。
| 变量 | 返回值 |
|---|---|
%yuteleport_group% | 当前命中的权限组名,无匹配时为 default。 |
%yuteleport_cost% | 当前世界随机传送有效费用。 |
%yuteleport_can_afford% | 当前余额是否足够支付随机传送。 |
%yuteleport_wait_effective% | 绕过权限后的有效等待秒数。 |
%yuteleport_bypass_cooldown% | 是否拥有冷却绕过权限。 |
%yuteleport_bypass_cost% | 是否拥有费用绕过权限。 |
%yuteleport_bypass_wait% | 是否拥有等待绕过权限。 |
%yuteleport_world_allowed% | 当前世界是否允许传送。 |
%yuteleport_world_radius_min% | 当前世界随机传送最小半径。 |
%yuteleport_world_radius_max% | 当前世界随机传送最大半径。 |
%yuteleport_world_max_attempts% | 当前世界安全点最大尝试次数。 |
%yuteleport_precache_cached% | 当前世界已缓存安全点数量。 |
%yuteleport_home_count% | 玩家 home 数量。 |
%yuteleport_home_max% | 玩家有效 home 上限。 |
%yuteleport_home_over_limit% | 玩家因权限上限降低而暂时超额的 home 数量。 |
%yuteleport_warp_owned_count% | 玩家自己创建的 warp 数量。 |
%yuteleport_warp_max% | 玩家有效 warp 上限。 |
%yuteleport_visible_warp_count% | 玩家可见 warp 数量。 |
%yuteleport_tpa_pending_count% | 玩家收到的待处理 TPA 请求数量。 |
分类型费用与等待
| 变量 | 返回值 |
|---|---|
%yuteleport_cost_random% | 随机传送有效费用。 |
%yuteleport_cost_warp% | warp 有效费用。 |
%yuteleport_cost_home% | home 有效费用。 |
%yuteleport_cost_tpa% | tpa 有效费用。 |
%yuteleport_cost_share% | 点击坐标分享传送的有效费用。 |
%yuteleport_cost_back% | back 有效费用。 |
%yuteleport_can_afford_<type>% | 是否能支付指定传送类型。 |
%yuteleport_wait_effective_<type>% | 指定传送类型的有效等待秒数。 |
%yuteleport_cooldown_total_<type>% | 指定传送类型的有效冷却总秒数。 |
%yuteleport_cooldown_<type>_total% | 上一项的兼容别名。 |
这里的 <type> 同样支持 random、warp、home、tpa、share、back。
参数化变量
| 变量 | 返回值 |
|---|---|
%yuteleport_world_allowed_<world>% | 指定世界是否允许传送,支持配置中的通配符规则。 |
%yuteleport_cost_<world>% | 指定世界的有效随机传送费用。 |
<world> 保留原大小写。未知变量按 PlaceholderAPI 约定返回 null。
本地化显示
在布尔变量后追加 _display,例如 %yuteleport_ready_display%,会返回语言文件中的 papi-yes 或 papi-no。%yuteleport_status_display% 会按查看者语言渲染状态文本。
测试
text
/papi parse me %yuteleport_status%
/papi parse me %yuteleport_cooldown_formatted%
/papi parse me %yuteleport_platform%
/papi parse me %yuteleport_cost_random%
/papi parse me %yuteleport_back_enabled%修改集成开关后执行 /yuteleport reload,插件会注销并按新配置重新注册扩展。