Skip to content

cev-api/YATPA

Repository files navigation

YATPA

Current version: 1.0.4

Yet Another TPA.

YATPA is a teleport plugin/mod project for modern Minecraft servers:

  • paper/: Paper plugin (1.21.x API target)
  • fabric/: Fabric dedicated-server mod (1.21.x Mojmap/Fabric API scaffold)

Help

Features

  • Player teleport requests:
    • /tpa <player>
    • /tpahere <player>
    • /tpaccept
    • /tpdeny
    • /tpatoggle
    • /tpablock <player>
    • /tpaunblock <player>
  • Homes:
    • /tphome set [name]
    • /tphome set default <name>
    • /tphome delete <name>
    • /tphome list
    • /tphome [name]
  • Utility teleports:
    • /rtp
    • /spawn
  • OP commands:
    • /ytp <player>
    • /ytp <player> <targetPlayer>
    • /ytp <player> <x> <y> <z> [realm]
    • /ytp <x> <y> <z> [realm]
    • /tpoffline <player>
  • In-game admin config (OP):
    • /yatpa settings
    • /yatpa gui (Paper, paginated inventory editor for all settings; click to toggle/edit)
    • /yatpa set <path> <value>
    • /yatpa reload
    • /setspawn
  • Player help page:
    • /tpahelp
    • /tphelp
    • /yatpa help
    • When teleport costs are enabled, a Costs section is shown at the bottom listing only teleports with non-zero costs.

Notable behavior

  • Request timeout and request cooldown.
  • Teleport delay with countdown.
  • Optional cancel on move/damage.
  • Clickable accept/deny messages.
  • XML-based messages.
  • Configurable sounds and particle effects.
  • Configurable teleport costs for each teleport type (XP or Items).
  • Costs are charged at teleport execution time (after countdown), not when countdown starts.
  • Cost failures show exact requirement (for example, required XP levels or item amount/type).
  • Feature toggles for tpa, tpahere, homes, and rtp.
  • RTP cooldown (settings.rtp_cooldown_seconds, default 300).
  • Optional /rtp to-overworld mode (settings.rtp.rtp_to_overworld, settings.rtp.overworld_name).
  • /rtp blacklist support (settings.rtp.blacklisted_worlds) in addition to dimension restrictions.
  • Configurable spawn location with /setspawn and settings.spawn.*.
  • Optional first-join spawn teleport (settings.spawn.first_join_only).
  • The ytp and rtp commands have safeguards against teleporting into lava or into walls/blocks and will move you to the nearest safe spot.
  • The ytp command also lets you teleport into different realms/dimensions.
  • The rtp command can have different costs for each realm/dimension.
  • rtp min/max distances can be overridden per realm (Overworld/Nether/End) on Fabric and Paper.
  • Per-dimension restrictions:
    • Disable /rtp only in specific dimensions.
    • Disable all YATPA teleports in specific dimensions.
  • After a successful paid teleport, the player is told exactly what they paid (XP or items).

Paper build output

The Paper module is configured to build:

  • paper/build/libs/YATPA-v1.x.x-Paper.jar

Fabric build output

The Fabric module is configured to build:

  • fabric/build/libs/YATPA-v1.x.x-Fabric.jar

Build

From repo root:

# Both Paper + Fabric
./gradlew clean build

# Paper only
./gradlew :paper:jar

# Fabric only
./gradlew :fabric:build

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:

  • config/yatpa/store.json

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
  costs:
    enabled: false
    mode: NONE # NONE, XP_LEVELS, ITEM
    xp_levels:
      tpa: 4
      tpahere: 4
      home: 16
      # 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
      # Per-realm RTP overrides (optional; overrides global if set)
      rtp:
        overworld: 30
        nether: 0
        end: 0
      spawn: 10
  spawn:
    enabled: true
    first_join_only: 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.setspawn (default: op)

License

Licensed under GNU General Public License v3.0 (GPL-3.0-only). See LICENSE.

About

YATPA: Yet Another TPA. A combination of various project ideas into one, but still lean and simple enough to be a viable replacement or solution to teleporting. Suitable for Fabric and Paper.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages