HomeJavaModsteleportCost
teleportCost
ModsJava

teleportCost

A lightweight Minecraft plugin for PaperMC that adds experience costs to teleport commands.

⬇ Download on HangarOpen in MCModsHubGet it on Google Play →
![TeleportCost icon](https://hangarcdn.papermc.io/avatars/project/3812.webp?v=1 "icon") # TeleportCost A lightweight Minecraft plugin for PaperMC that adds experience costs to teleport commands, complete with some visual flair and sound effects! (Works with Xaero's Minimap/World Map waypoints too — see below.) ## 🚀 How it works TeleportCost listens for `PlayerTeleportEvent` with cause `COMMAND`, so it catches any teleport triggered through `/tp`, `/teleport`, or anything that dispatches those under the hood — including `/execute ... run tp ...`. Cost is deducted only if the teleport actually goes through, not before. Just make sure your players have `minecraft.command.teleport` in their permission group (via LuckPerms or whatever you use). ### About Xaero's waypoints Xaero's Minimap sends `/tp @s x y z` when you click a waypoint. Vanilla requires OP level 2 for *any* target selector (`@s`, `@a`, `@p`...), and that check isn't tied to a Bukkit permission node — so LuckPerms can't grant it no matter what you do. That's the classic "teleport works from chat but not from the minimap" issue. TeleportCost works around this by rewriting `@s` to the player's own name before vanilla parses the command. Since `@s` always resolves to the sender anyway, this changes nothing about what the command does — it just avoids the selector check entirely. Non-op players with `minecraft.command.teleport` can now use waypoint teleports normally. If you'd rather not have the plugin touch the command at all, you can disable this in the config and instead tell Xaero's to stop sending a selector: open the minimap settings (default key `Y`) → Waypoints → Options → Teleport command → turn off "Use Default" → delete `@s` from both fields. That's per-player though, so most people just leave the plugin's rewrite on. ## ⚙️ Configuration ``` teleport-cost: 5 # How much it costs to teleport (0 disables the cost) cost-type: levels # 'levels' or 'exp' rewrite-self-selector: true # Fixes @s-based teleports (Xaero's waypoints etc.) free-in-creative: true # No cost in creative/spectator ``` levels = experience levels (the green number), exp = raw experience points (the bar). ``` particle-count: 50 # Number of particles on teleport particle-offset: 1.0 # Particle spread success-sound-pitch: 1.0 # Sound pitch on success fail-sound-pitch: 1.2 # Sound pitch on failure ``` Players with the `teleportcost.exempt` permission teleport for free. To edit: 1. Start your PaperMC server once (this generates the config). 2. Open `/plugins/TeleportCost/config.yml` with your favorite text editor. 3. Restart the server to apply changes. ## 📦 Installation 1. Download the latest `.jar` file. 2. Drop it into your PaperMC server's `/plugins/` folder. 3. Restart the server. That's it. ## 🛠️ Building from source If you're feeling adventurous or want to tinker: ``` git clone https://github.com/ctrldemi/TeleportCost.git && cd TeleportCost mvn clean package ``` Requires Maven and a JDK 21+. ## ⭐ Thanks A huge "Thank You!" to the creator(s) of [TPPlugin](https://www.spigotmc.org/resources/tp-exp-cost.117452/) who broadly inspired this plugin.

teleportCost is a free Minecraft Java mod. Compatible with Minecraft 1.21, 1.21.1, 1.21.10, 1.21.11 and newer. Downloaded 53 times (via Hangar). Download it and open it directly in the game.

Explore more