▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Pay To Teleport
Pay To Teleport

Pay To Teleport

This is a minecraft fabric mod that allows you to teleport with configurable item and costs.

500
4

PayTp Mod Documentation

  • Updated on 2025-10-27
  • 中文文档请看这里

Overview

PayTp is a lightweight Fabric mod for Minecraft that allows players to teleport by paying a certain amount of in-game currency (items).
It supports flexible teleportation modes, multi-language localization, and fully customizable cost rules.


Features

  • Cross-dimension teleport to a specified location
  • Player teleport request system
  • Home and Back
  • Beacon waypoint (Warp)
  • Adjustable teleportation cost algorithm
  • Ender Chest / Shulker Box payment support
  • Cloth Config API support (client-side)
  • Can be used as a server-side only mod

Most features can be disabled by setting their corresponding command names to empty strings. For example, changing general.mainCommand in the config file from ptp to empty will disable the coordinate teleport function. The in-game help guide will automatically adapt.


Commands

All displays show the default command names, where <> indicates required parameters and () indicates optional parameters

CommandDescription
/ptp Get command guide for PayTp
/ptp (dimension) <x> <y> <z>Teleport to specified coordinates (in a specific dimension)
/ptpto <player>Send request to teleport to a player
/ptphere <player>Send request to a player to teleport to you
/ptpaccept (player)Accept a teleport request (from a specific player)
/ptpdeny (player)Deny a teleport request (from a specific player)
/ptpcancel (player)Cancel a pending teleport request (to a specific player)
/ptpbackReturn to the previous location
/ptphomeTeleport to your home (if configured)
/ptphome setSet your home to your current position
/ptpwarp <name>Teleport to the specified waypoint
/ptpwarp create <name>Create a new waypoint (must be within an active beacon beam)
/ptpwarp delete <name>Delete the specified waypoint
/ptpwarp list (page)View all waypoints on the server

Configuration

Configuration File Location:

~/config/paytp.json

Example Structure:

{
  "general": {
    "language": "en_us",
    "mainCommand": "ptp",
    "crossDimMultiplier": 1.5
  },
  "request": {
    "requestCommand": {
      "toCommand": "ptpto",
      "here": "ptphere",
      "acceptCommand": "ptpaccept",
      "denyCommand": "ptpdeny",
      "cancelCommand": "ptpcancel"
    },
    "expireTime": 10
  },
  "home": {
    "homeCommand": "ptphome",
    "homeMultiplier": 0.5
  },
  "back": {
    "backCommand": "ptpback",
    "maxBackStack": 10,
    "backMultiplier": 0.8
  },
  "warp": {
    "warpCommand": "ptpwarp",
    "maxInactiveTicks": 100,
    "checkPeriodTicks": 20,
    "warpMultiplier": 0.5
  },
  "price": {
    "currencyItem": "minecraft:diamond",
    "parameter": {
      "minPrice": 1,
      "maxPrice": 64,
      "baseRadius": 10.0,
      "rate": 0.01
    }
  },
  "setting": {
    "effect": {
      "particleEffect": true,
      "soundEffect": true
    },
    "flag": {
      "allowEnderChest": true,
      "prioritizeEnderChest": true,
      "allowShulkerBox": false,
      "prioritizeShulkerBox": false
    }
  }
}

Configuration Details

General Settings

FieldTypeDescription
languagestringLanguage file (e.g., zh_cn, en_us, zh_tw), affects messages and help text.
mainCommandstringMain command name, e.g., /ptp.
crossDimMultiplierdoublePrice multiplier for cross-dimensional teleportation, e.g., 1.5 means 1.5× the base price.

Teleport Request System

Request Commands

FieldTypeDescription
toCommandstringCommand to request teleporting to the target player (default /ptpto).
hereCommandstringCommand to request the target player to teleport to your location (default /ptphere).
acceptCommandstringCommand to accept a request (default /ptpaccept).
denyCommandstringCommand to deny a request (default /ptpdeny).
cancelCommandstringCommand to cancel a sent request (default /ptpcancel).

Configuration

FieldTypeDescription
expireTimeintTeleport request expiration time in seconds.

Home System

FieldTypeDescription
homeCommandstringCommand to teleport home (default /ptphome).
homeMultiplierdoubleHome teleport multiplier, e.g., 0.5 means half price.

Back System

FieldTypeDescription
backCommandstringCommand to return to previous location (default /ptpback).
maxBackStackintMaximum number of saved historical positions.
backMultiplierdoubleBack teleport multiplier, e.g., 0.8 means 20% discount.

Waypoint System

FieldTypeDescription
warpCommandstringCommand name to teleport to a waypoint (default /ptpwarp).
maxInactiveTicksintThe cooldown time before a waypoint is deleted after its associated beacon is deactivated.
checkPeriodTicksintThe interval for checking waypoint-to-beacon matching.
warpMultiplierdoubleWaypoint teleport multiplier, e.g., 0.5 means half price.

Cost Calculation Settings

Currency

FieldTypeDescription
currencyItemstringThe item ID used as currency, e.g., minecraft:diamond.

Parameters

FieldTypeDescription
minPriceintMinimum teleport cost.
maxPriceintMaximum cost per teleport.
baseRadiusdoubleRadius within which teleportation costs the minimum price.
ratedoubleDistance increase rate for cost beyond base radius.

Settings

Effects

FieldTypeDescription
particleEffectbooleanEnable particle effects during teleportation.
soundEffectbooleanEnable sound effects during teleportation.

Feature Flags

FieldTypeDescription
allowEnderChestbooleanAllow using currency from Ender Chests.
prioritizeEnderChestbooleanPrioritize deduction from Ender Chests.
allowShulkerBoxbooleanAllow using currency from Shulker Boxes.
prioritizeShulkerBoxbooleanPrioritize deduction from Shulker Boxes.

Price Calculation Formula

Calculation Logic

  1. Distance Calculation:

    • Same dimension:
      • Use direct Euclidean distance.
    • Cross-dimension:
      • Overworld × 8 → Nether;
      • Nether × 0.125 → Overworld;
      • Entering/leaving The End: use the distance from whichever coordinate is in The End to the End center (0,0,0).
    • Other dimensions:
      • Use Euclidean distance by default. Can customize in PayTpCalculator#calculateDistance.
  2. Formula:

    distanceBeyondBase = max(0, distance - baseRadius)
    rawPrice = minPrice + distanceBeyondBase * increaseRate
    totalPrice = rawPrice * externalMultiplier
    
  3. Final Price:

    price = min(totalPrice, maxPrice)
    

Example Calculation

Default price configuration:

{
   "minPrice": 1,
   "maxPrice": 64,
   "baseRadius": 10.0,
   "rate": 0.01,
   "crossDimMultiplier": 1.5
}
  • Player A teleports to Player B (same world, distance 200 blocks):
    Extra distance = 200 - 10 = 190
    Price = (1 + 190 × 0.01) × 1.0 = 2.9 → rounded to 3
    
  • Cross-dimensional teleport:
    Price = 3 × 1.5 = 4.5 → rounded to 5
    
  • Price is capped at 64 automatically.

Cloth Config Support

If the Cloth Config API is installed, all settings can be adjusted directly through the in-game Mod Menu GUI. (World restart may be required.)


Compatibility & Deployment

TypeSupported
Fabric Loader
Server Only
Client UI (Cloth Config)
Multi-language Supporten_us / zh_cn / zh_tw
Minecraft Version1.21.4+

Credits

This mod is inspired by early economy-style teleport plugins. The request logic references the Teleport Command mod. The waypoint logic references the Beacon Waypoint mod.
Developed using Fabric API and fully compatible with vanilla saves.
Feel free to submit issues or pull requests on GitHub to improve configuration and calculation algorithms.

Совместимость

Minecraft: Java Edition

1.21.x

Платформы

Поддерживаемые окружения

Сервер

Детали

Лицензия:GPL-3.0-only
Опубликован:4 месяца назад
Обновлён:2 месяца назад
Главная