YATPA
YATPA 是一个面向现代 Minecraft 服务器的传送插件/模组项目。
YATPA 的独特之处在于,它将完整的传送请求、家(home)、返回(back)、出生点(spawn)、随机传送(RTP)、虚空(void)、地表(surface)和死亡位置等工具功能与聊天中可点击的命令用户体验(/tp 菜单、分页选择器和分页日志)相结合,同时为每种传送类型提供细粒度的费用控制。经济模式可配置为 NONE(无)、XP_LEVELS(经验等级)、ITEM(物品)或 CURRENCY(货币);Paper 服务器通过 Vault(配合 EssentialsX 或其他 Vault 经济提供商)支持 CURRENCY 模式。OP(管理员)拥有一个可选的 GUI 菜单,可在游戏内微调设置。
截图
帮助界面(通过 /TPAHELP)
可点击的 TP 菜单(通过 /TP)
OP 的可点击 TP 日志(通过 /TPLOG)
可点击的家列表(通过 /TPHOME LIST)
可点击的玩家列表(通过 /TPA 且不指定用户名时)
功能
- 可点击的传送菜单:
/tp
- 包含家的快捷方式、RTP、出生点、死亡返回、TPA/TPHere、切换、屏蔽和解封等功能。
/tpa、/tphere、/tpablock 和 /tpaunblock 的玩家选择器是分页显示的(每页 5 人)。
- 玩家传送请求:
/tpa <player>
/tpahere <player> 或 /tphere <player>
/tpaccept
/tpdeny
/tpatoggle
/tpablock <player>
/tpaunblock <player>
- 家(Homes):
/tphome set [name]
/tphome set default <name>
/tphome delete <name>
/tphome list
/tphome [name] 或 /tpahome [name]
- 家列表可点击并显示坐标。
- 默认家会标记为
(default)。
- 实用传送:
/rtp
/spawn
/tpaback 或 /tpdeath(上次死亡位置,每次死亡仅可使用一次)
/tpsurface(寻找附近安全的地表着陆点;默认禁用)
/tpvoid(在安全的下界屋顶位置和下方的安全位置之间切换;默认禁用)
- 家的费用:
settings.costs.*.home 对前往家的传送收费。
settings.costs.*.home_set 对设置或替换家收费。
- OP 命令:
/ytp <player>
/ytp <player> <targetPlayer>
/ytp <player> <x> <y> <z> [realm]
/ytp <x> <y> <z> [realm]
/tpoffline <player>
/tpalog [page]
- 游戏内管理配置(OP):
/yatpa settings
/yatpa gui(Paper/Fabric 原生对话框编辑器;当服务器未暴露对话框命令时,Paper 使用库存编辑器)
/yatpa set <path> <value>
/yatpa reload
/setspawn
- “费用”部分拥有独立的经验、物品和货币子菜单。
/tpsurface 和 /tpvoid 可在“功能”部分启用。
- 玩家帮助页面:
/tpahelp
/tphelp
/yatpa help
- 公共帮助故意排除了管理员命令。
- 当启用传送费用时,底部会显示一个
Costs(费用)部分,仅列出非零费用的传送类型。
OP 对话框菜单
运行 /yatpa gui 即可使用现代化的游戏内设置编辑器。它将 YATPA 选项组织成清晰的类别,包含内联开关、选择器和文本字段,并内置了验证和保存控制功能。当不可用原生对话框时,Paper 会回退到库存编辑器;Fabric 不需要客户端侧的 YATPA 模组。
显著行为
- 请求处理:
- 强制执行超时和冷却时间。
- 接受/拒绝消息是可点击的。
- 如果已接受的延迟传送被取消(移动/受伤),另一名玩家会收到通知。
- 传送执行:
- 延迟传送会显示倒计时。
- 在倒计时前验证费用,并在执行时扣除。
- 玩家会确切知道他们支付了多少(经验、物品或货币)。
ytp/rtp 使用安全着陆检查以避免不安全方块和岩浆。
/tpaback 和 /tpdeath 在成功使用后消耗保存的死亡位置,需要新的死亡来刷新。
- 传送日志:
/tpalog 是分页且可点击的。
- 日志行包含上下文详情(例如家名称、目标玩家、坐标或离线目标),视情况而定。
- 费用和设置:
- 费用模式:
NONE(无)、XP_LEVELS(经验等级)、ITEM(物品)、CURRENCY(货币)。
- 支持特定领域(Realm)的 RTP 费用以及最小/最大 RTP 距离覆盖。
- Paper 的
/yatpa gui 和 /yatpa set 直接暴露货币路径。
- 限制和路由:
- 可按维度限制,仅禁用
/rtp 或所有 YATPA 传送。
/rtp 支持黑名单 + 可选的主世界路由。
- 出生点目的地可通过
settings.spawn.* 和 /setspawn 配置。
- 平台说明:
- 在此版本中,Vault/EssentialsX 货币扣费仅限 Paper。
- Paper jar 使用 Bukkit API 并标记为 Folia 兼容,因此可在 Paper、Purpur、Spigot、Bukkit 和 Folia 上运行。在有可用原生对话框时使用它们;在没有原生对话框的 Bukkit 系列服务器上,库存编辑器作为后备方案。
- 除非另有说明,本自述文件中的命令/UX 行为适用于 Paper 和 Fabric。
配置
Paper 配置文件:
paper/src/main/resources/config.yml
paper/src/main/resources/messages.xml
paper/src/main/resources/plugin.yml
Fabric 默认配置/资源文件:
fabric/src/main/resources/yatpa-fabric.properties
fabric/src/main/resources/yatpa-fabric.yml
fabric/src/main/resources/messages-fabric.xml
运行时数据(Paper)存储在插件数据文件夹下:
data/players.yml
data/homes.yml
data/offline.yml
运行时数据(Fabric)存储在:
示例配置 YAML
settings:
max_homes_default: 3
request_timeout_seconds: 60
request_cooldown_seconds: 30
teleport_delay_seconds: 5
cancel_on_move: true
cancel_on_damage: true
spawn_radius: 50
rtp_cooldown_seconds: 300
rtp:
default_min_distance: 64
default_max_distance: 2500
rtp_to_overworld: false
overworld_name: "world"
blacklisted_worlds: []
# 可选的每个领域覆盖设置
realm_min_distance:
overworld: 96
nether: 48
end: 128
realm_max_distance:
overworld: 3000
nether: 1500
end: 4000
dimension_restrictions:
# 使用世界名称、领域别名(overworld/nether/end)或命名空间 ID。
# 对于 YAML 中的命名空间 ID,请对键名加上引号,例如 "minecraft:the_nether"。
disable_rtp:
nether: true
disable_teleport:
# "minecraft:the_end": true
landing:
mode: EXACT # EXACT 或 RANDOM_OFFSET
random_offset_max: 4
features:
enabled: true
tpa: true
tpahere: true
homes: true
rtp: true
tpsurface: false
tpvoid: false
costs:
enabled: false
mode: NONE # NONE, XP_LEVELS, ITEM, CURRENCY
xp_levels:
tpa: 4
tpahere: 4
home: 16
home_set: 0
back: 0
# 每个领域的 RTP 覆盖设置(可选;如果设置则覆盖全局设置)
rtp:
overworld: 30
nether: 0
end: 0
spawn: 8
item:
material: DIAMOND
tpa: 2
tpahere: 2
home: 20
home_set: 0
back: 0
# 每个领域的 RTP 覆盖设置(可选;如果设置则覆盖全局设置)
rtp:
overworld: 30
nether: 0
end: 0
spawn: 10
currency:
tpa: 0.0
tpahere: 0.0
home: 0.0
home_set: 0.0
back: 0.0
# 每个领域的 RTP 覆盖设置(可选;如果设置则覆盖全局设置)
rtp:
overworld: 0.0
nether: 0.0
end: 0.0
spawn: 0.0
spawn:
enabled: true
x: 0
y: 100
z: 0
yaw: 0
pitch: 0
world: world
sounds:
request_sent: ENTITY_EXPERIENCE_ORB_PICKUP
request_received: BLOCK_NOTE_BLOCK_PLING
countdown: BLOCK_BELL_USE
success: ENTITY_ENDERMAN_TELEPORT
cancelled: BLOCK_GLASS_BREAK
effects:
request_sent: PORTAL
request_received: ENCHANT
countdown: WAX_OFF
success: END_ROD
cancelled: SMOKE
Fabric config.properties 支持相同的限制条件,可以使用以下格式:
settings.dimension_restrictions.disable_rtp=overworld,minecraft:the_nether
settings.dimension_restrictions.disable_teleport=minecraft:the_end,my_custom_dimension
- 动态键名,如
settings.dimension_restrictions.disable_teleport.minecraft:the_nether=true
权限 (Paper)
yatpa.op.reload (默认: op)
yatpa.op.tp (默认: op)
yatpa.op.tpoffline (默认: op)
yatpa.op.tpalog (默认: op)
yatpa.op.setspawn (默认: op)
许可证
采用 GNU General Public License v3.0 (GPL-3.0-only) 许可。
YATPA
YATPA is a teleport plugin/mod project for modern Minecraft servers.
What makes YATPA stand out is that it combines full teleport-request/home/back/spawn/RTP/void/surface/death tooling with a clickable in-chat command UX (/tp menu, paged pickers, and paged logs), while also exposing granular cost controls per teleport type. Economy mode is configurable as NONE, XP_LEVELS, ITEM, or CURRENCY; Paper supports CURRENCY through Vault (with EssentialsX or another Vault economy provider). OPs have an optional GUI menu to fine tune settings in-game.
Screenshots
Help (via /TPAHELP)
Clickable TP Menu (via /TP)
Clickable TP Logs for OPs (via /TPLOG)
Clickable Home List (via /TPHOME LIST)
Clickable User List (via /TPA with no username specified)
Features
- Clickable teleport menu:
/tp
- Includes shortcuts for homes, RTP, spawn, death-back, TPA/TPHere, toggle, block, and unblock.
- Player pickers are paginated (5 per page) for
/tpa, /tphere, /tpablock, and /tpaunblock.
- Player teleport requests:
/tpa <player>
/tpahere <player> or /tphere <player>
/tpaccept
/tpdeny
/tpatoggle
/tpablock <player>
/tpaunblock <player>
- Homes:
/tphome set [name]
/tphome set default <name>
/tphome delete <name>
/tphome list
/tphome [name] or /tpahome [name]
- Home list is clickable and shows coordinates.
- The default home is marked with
(default).
- Utility teleports:
/rtp
/spawn
/tpaback or /tpdeath (last death location, one use per death)
/tpsurface (finds a safe nearby surface landing; disabled by default)
/tpvoid (switches between a safe Nether roof position and a safe position below it; disabled by default)
- Home costs:
settings.costs.*.home charges for travelling to a home.
settings.costs.*.home_set charges for setting or replacing a home.
- OP commands:
/ytp <player>
/ytp <player> <targetPlayer>
/ytp <player> <x> <y> <z> [realm]
/ytp <x> <y> <z> [realm]
/tpoffline <player>
/tpalog [page]
- In-game admin config (OP):
/yatpa settings
/yatpa gui (Paper/Fabric native dialog editor; Paper uses the inventory editor when the server does not expose the dialog command)
/yatpa set <path> <value>
/yatpa reload
/setspawn
- The Costs section has separate XP, item, and currency submenus.
/tpsurface and /tpvoid can be enabled under Features.
- Player help page:
/tpahelp
/tphelp
/yatpa help
- Public help intentionally excludes admin commands.
- When teleport costs are enabled, a
Costs section is shown at the bottom listing only teleports with non-zero costs.
OP dialog menu
Run /yatpa gui for a modern in-game settings editor. It organizes YATPA options into clear categories with inline toggles, selectors, and text fields, with validation and save controls built in. Paper falls back to the inventory editor when native dialogs are unavailable; Fabric requires no client-side YATPA mod.
Notable Behavior
- Requests:
- Timeout + cooldown are enforced.
- Accept/deny messages are clickable.
- If an accepted delayed teleport is cancelled (move/damage), the other player is notified.
- Teleports:
- Delayed teleports show a countdown.
- Costs are validated before countdown and charged on execution.
- Players are told exactly what they paid (XP, items, or currency).
ytp/rtp use safe landing checks to avoid unsafe blocks and lava.
/tpaback and /tpdeath consume the saved death location after successful use, and require a new death to refresh.
- Teleport logging:
/tpalog is paginated and clickable.
- Log lines include context details (for example home name, target player, coords, or offline target) where relevant.
- Costs and settings:
- Cost modes:
NONE, XP_LEVELS, ITEM, CURRENCY.
- Realm-specific RTP costs and min/max RTP distance overrides are supported.
- Paper
/yatpa gui and /yatpa set expose currency paths directly.
- Restrictions and routing:
- Per-dimension restrictions can disable
/rtp only or all YATPA teleports.
/rtp supports blacklist + optional overworld routing.
- Spawn destination is configurable via
settings.spawn.* and /setspawn.
- Platform note:
- Vault/EssentialsX currency charging is Paper-only in this release.
- The Paper jar uses Bukkit APIs and is marked Folia-compatible, so it runs on Paper, Purpur, Spigot, Bukkit, and Folia. Native dialogs are used when available; the inventory editor remains the fallback on Bukkit-family servers without them.
- Command/UX behavior in this README applies to both Paper and Fabric unless noted.
Configuration
Paper config files:
paper/src/main/resources/config.yml
paper/src/main/resources/messages.xml
paper/src/main/resources/plugin.yml
Fabric default config/resource files:
fabric/src/main/resources/yatpa-fabric.properties
fabric/src/main/resources/yatpa-fabric.yml
fabric/src/main/resources/messages-fabric.xml
Runtime data (Paper) is stored under plugin data folder:
data/players.yml
data/homes.yml
data/offline.yml
Runtime data (Fabric) is stored under:
Example Config YAML
settings:
max_homes_default: 3
request_timeout_seconds: 60
request_cooldown_seconds: 30
teleport_delay_seconds: 5
cancel_on_move: true
cancel_on_damage: true
spawn_radius: 50
rtp_cooldown_seconds: 300
rtp:
default_min_distance: 64
default_max_distance: 2500
rtp_to_overworld: false
overworld_name: "world"
blacklisted_worlds: []
# Optional per-realm overrides
realm_min_distance:
overworld: 96
nether: 48
end: 128
realm_max_distance:
overworld: 3000
nether: 1500
end: 4000
dimension_restrictions:
# Use world names, realm aliases (overworld/nether/end), or namespaced ids.
# For namespaced ids in YAML, quote the key, for example "minecraft:the_nether".
disable_rtp:
nether: true
disable_teleport:
# "minecraft:the_end": true
landing:
mode: EXACT # EXACT or RANDOM_OFFSET
random_offset_max: 4
features:
enabled: true
tpa: true
tpahere: true
homes: true
rtp: true
tpsurface: false
tpvoid: false
costs:
enabled: false
mode: NONE # NONE, XP_LEVELS, ITEM, CURRENCY
xp_levels:
tpa: 4
tpahere: 4
home: 16
home_set: 0
back: 0
# Per-realm RTP overrides (optional; overrides global if set)
rtp:
overworld: 30
nether: 0
end: 0
spawn: 8
item:
material: DIAMOND
tpa: 2
tpahere: 2
home: 20
home_set: 0
back: 0
# Per-realm RTP overrides (optional; overrides global if set)
rtp:
overworld: 30
nether: 0
end: 0
spawn: 10
currency:
tpa: 0.0
tpahere: 0.0
home: 0.0
home_set: 0.0
back: 0.0
# Per-realm RTP overrides (optional; overrides global if set)
rtp:
overworld: 0.0
nether: 0.0
end: 0.0
spawn: 0.0
spawn:
enabled: true
x: 0
y: 100
z: 0
yaw: 0
pitch: 0
world: world
sounds:
request_sent: ENTITY_EXPERIENCE_ORB_PICKUP
request_received: BLOCK_NOTE_BLOCK_PLING
countdown: BLOCK_BELL_USE
success: ENTITY_ENDERMAN_TELEPORT
cancelled: BLOCK_GLASS_BREAK
effects:
request_sent: PORTAL
request_received: ENCHANT
countdown: WAX_OFF
success: END_ROD
cancelled: SMOKE
Fabric config.properties supports the same restrictions with either:
settings.dimension_restrictions.disable_rtp=overworld,minecraft:the_nether
settings.dimension_restrictions.disable_teleport=minecraft:the_end,my_custom_dimension
- Dynamic keys like
settings.dimension_restrictions.disable_teleport.minecraft:the_nether=true
Permissions (Paper)
yatpa.op.reload (default: op)
yatpa.op.tp (default: op)
yatpa.op.tpoffline (default: op)
yatpa.op.tpalog (default: op)
yatpa.op.setspawn (default: op)
License
Licensed under GNU General Public License v3.0 (GPL-3.0-only).
评论 0
登录后参与评分
还没有评论,来抢沙发吧