tpc
tpc 是一款适用于 Paper 服务器的轻量级传送工具。它提供玩家传送请求、可点击控件、家园、床、出生点、返回功能、可配置的传送行为,以及可选的命令别名,无需安装客户端模组或资源包即可使用。
传送请求
tpa 和 tph 为定向传送请求。
/tpa [player|cancel|page <number>]
/tph [player|cancel|page <number>]
/tpa <player> 请求传送到该玩家处。
/tph <player> 请求该玩家传送到你这里。
在不指定玩家的情况下运行任一命令将打开一个可点击的玩家列表。在大型服务器上,玩家列表会分页显示。
可以使用以下命令管理请求:
/accept
/decline
请求会根据配置过期时间自动失效,当任何一方断开连接时也会被取消。
/tpc 界面
单独执行 /tpc 将打开可点击的传送菜单。
/tpc [ask|here|accept|decline|bed|home|spawn]
子命令通过单一命令实现相同功能:
/tpc ask
/tpc here
/tpc accept
/tpc decline
/tpc bed
/tpc home
/tpc spawn
请求选择也可通过菜单直接进行:
/tpc ask [player|cancel|page <number>]
/tpc here [player|cancel|page <number>]
家园也可以通过 /tpc 进行管理:
/tpc home
/tpc home list
/tpc home set <name> [is-primary]
/tpc home delete <name>
/tpc home primary <name>
家园
家(Homes)是持久化的,并由玩家存储。
/home
/home list
/home set <name> [is-primary]
/home delete <name>
/home primary <name>
当存在主家时,不带参数使用 /home 会传送至玩家的主家。否则,将打开家园列表。
每位玩家可以拥有数量可配置的家。家可以被设置为主家以便快速访问。
其他传送目的地
/bed
/spawn
/back
/bed 传送至玩家当前的重生点。
/spawn 传送至当前世界的出生点。
/back 在成功传送后返回由插件记录的上一位置。
传送行为
传送可以配置为在发生前带有延迟时间,并在成功传送后带有冷却时间。
当玩家满足以下条件时,可选地取消待处理的传送:
还可以启用目的地安全检查。启用后,目的地必须为玩家的双脚和头部提供可通过的空间,且下方有实心地面。
插件会以不刷屏的方式报告重要的传送状态,如延迟、冷却、取消和失败。
命令别名
已经使用诸如 /accept、/back 或 /home 等命令的服务器可以启用替代名称。
替代命令:
启用: false
tpaccept: true
tpdecline: true
tpback: true
tpbed: true
tphome: true
tpspawn: true
启用后,这些命令会映射到其对应的正常命令:
/tpaccept -> /accept
/tpdecline -> /decline
/tpback -> /back
/tpbed -> /bed
/tphome -> /home
/tpspawn -> /spawn
各个标志位允许单独启用或禁用每个替代命令。
独立命令
独立命令默认启用:
standalone-commands: true
启用后,可以直接使用正常的命令:
/tpa
/tph
/accept
/decline
/back
/bed
/home
/spawn
设置为:
standalone-commands: false
即可改用 /tpc 作为主要的面向玩家的接口。
配置
配置文件位于:
plugins/tpc/config.yml
默认配置如下:
request-expiration: 60
teleport-delay: 3
teleport-cooldown: 5
standalone-commands: true
alternative-commands:
enable: false
tpaccept: true
tpdecline: true
tpback: true
tpbed: true
tphome: true
tpspawn: true
homes:
limit: 3
safety:
require-safe-destination: false
cancel-on-movement: false
cancel-on-damage: false
请求过期时间
request-expiration: 60
未响应的传送请求在多少秒后过期。
传送延迟
teleport-delay: 3
开始传送与完成传送之间的秒数。
设置为 0 可实现立即传送。
传送冷却时间
teleport-cooldown: 5
在一次成功传送后,玩家必须等待多少秒才能开始下一次传送。
设置为 0 可禁用冷却时间。
家园数量限制
homes:
limit: 3
每个玩家可以存储的最大家园数量。
安全目的地
safety:
require-safe-destination: false
启用后,插件会检查目的地是否有足够的空间容纳玩家以及坚实的脚下地面。
移动取消传送
cancel-on-movement: false
启用后,在传送延迟期间移动到另一个 X/Z 方块将取消传送。
受伤取消传送
cancel-on-damage: false
启用后,在传送延迟期间受到伤害将取消传送。
重载配置
无需重启服务器即可重载配置:
/tpr
这需要权限:
tpc.reload
如果必需的配置项无效,插件将拒绝接受该配置,并报告失败的具体配置路径。
权限
主要权限包括:
tpc.command
tpc.reload
tpc.request
tpc.here
tpc.accept
tpc.decline
tpc.back
tpc.bed
tpc.home
tpc.spawn
替代命令使用与其对应命令关联的权限。
插件会根据配置调整命令权限的默认值,因此被禁用的命令组不会对普通玩家可用。
兼容性
tpc 在 Paper 服务器上运行,不需要:
Java 玩家和 Geyser/Floodgate 玩家使用相同的命令和可点击的聊天界面。
tpc
tpc is a lightweight teleportation utility for Paper servers. It provides player teleport requests, clickable controls, homes, bed, spawn, back, configurable teleport behavior, and optional command aliases without requiring a client-side mod or resource pack.
Teleport Requests
tpa and tph are directional teleport requests.
/tpa [player|cancel|page <number>]
/tph [player|cancel|page <number>]
/tpa <player> asks to teleport to that player.
/tph <player> asks that player to teleport to you.
Running either command without a player opens a clickable player list. Player lists are paginated on larger servers.
Requests can be managed with:
/accept
/decline
Requests expire automatically according to the configured expiration time and are cancelled when either player disconnects.
The /tpc Interface
/tpc by itself opens the clickable teleport menu.
/tpc [ask|here|accept|decline|bed|home|spawn]
The subcommands provide the same functionality through one command:
/tpc ask
/tpc here
/tpc accept
/tpc decline
/tpc bed
/tpc home
/tpc spawn
Request selection also works directly through the menu:
/tpc ask [player|cancel|page <number>]
/tpc here [player|cancel|page <number>]
Homes can also be managed through /tpc:
/tpc home
/tpc home list
/tpc home set <name> [is-primary]
/tpc home delete <name>
/tpc home primary <name>
Homes
Homes are persistent and stored by player.
/home
/home list
/home set <name> [is-primary]
/home delete <name>
/home primary <name>
Using /home with no arguments teleports to the player's primary home when one exists. Otherwise, it opens the home list.
Each player can have a configurable number of homes. Homes can be assigned as the primary home for quick access.
Other Teleport Destinations
/bed
/spawn
/back
/bed teleports to the player's current respawn location.
/spawn teleports to the current world spawn.
/back returns to the previous location recorded by the plugin after a successful teleport.
Teleport Behavior
Teleports can be configured with a delay before the teleport occurs and a cooldown after a successful teleport.
A pending teleport can optionally be cancelled when the player:
- moves to another X/Z block
- takes damage
Destination safety checks can also be enabled. When enabled, the destination must provide a passable space for the player's feet and head with solid ground underneath.
The plugin reports important teleport state such as delays, cooldowns, cancellation, and failures without flooding the player's chat.
Command Alternatives
Servers that already use commands such as /accept, /back, or /home can enable alternative names.
alternative-commands:
enable: false
tpaccept: true
tpdecline: true
tpback: true
tpbed: true
tphome: true
tpspawn: true
When enabled, these commands map to their normal counterparts:
/tpaccept -> /accept
/tpdecline -> /decline
/tpback -> /back
/tpbed -> /bed
/tphome -> /home
/tpspawn -> /spawn
The individual flags allow each alternative to be enabled or disabled separately.
Standalone Commands
Standalone commands are enabled by default:
standalone-commands: true
When enabled, the normal commands can be used directly:
/tpa
/tph
/accept
/decline
/back
/bed
/home
/spawn
Set:
standalone-commands: false
to use /tpc as the main player-facing interface instead.
Configuration
The configuration file is located at:
plugins/tpc/config.yml
Default configuration:
request-expiration: 60
teleport-delay: 3
teleport-cooldown: 5
standalone-commands: true
alternative-commands:
enable: false
tpaccept: true
tpdecline: true
tpback: true
tpbed: true
tphome: true
tpspawn: true
homes:
limit: 3
safety:
require-safe-destination: false
cancel-on-movement: false
cancel-on-damage: false
Request expiration
request-expiration: 60
The number of seconds before an unanswered teleport request expires.
Teleport delay
teleport-delay: 3
The number of seconds between starting a teleport and completing it.
Set to 0 for an immediate teleport.
Teleport cooldown
teleport-cooldown: 5
The number of seconds a player must wait before starting another teleport after a successful teleport.
Set to 0 to disable the cooldown.
Home limit
homes:
limit: 3
The maximum number of homes each player can store.
Safe destinations
safety:
require-safe-destination: false
When enabled, the plugin checks that a destination has enough space for the player and solid ground underneath.
Movement cancellation
cancel-on-movement: false
When enabled, moving to another X/Z block during the teleport delay cancels the teleport.
Damage cancellation
cancel-on-damage: false
When enabled, taking damage during the teleport delay cancels the teleport.
Reloading
Configuration can be reloaded without restarting the server:
/tpr
This requires:
tpc.reload
Invalid required configuration prevents the plugin from accepting the configuration and reports the configuration path that failed.
Permissions
The main permissions are:
tpc.command
tpc.reload
tpc.request
tpc.here
tpc.accept
tpc.decline
tpc.back
tpc.bed
tpc.home
tpc.spawn
Alternative commands use the permission associated with their corresponding command.
The plugin adjusts the command permission defaults according to the configuration, so disabled command groups do not remain available to normal players.
Compatibility
tpc runs server-side on Paper and does not require:
- a client-side mod
- a resource pack
- a special client
Java players and Geyser/Floodgate players use the same command and clickable chat interface.
评论 0
登录后参与评分
还没有评论,来抢沙发吧