Skip to content

Teleportation

alexisleder edited this page Nov 8, 2026 · 2 revisions

Teleportation

This page explains how protection teleportation works in LederProtections.

Teleportation allows players to return to their protections through the protection GUI or supported commands, depending on configuration.


What is Protection Teleportation?

Protection teleportation lets players teleport to a saved location inside or near one of their protections.

A typical flow:

  1. The player opens /p.
  2. The player selects one of their protections.
  3. The player chooses the teleport option.
  4. LederProtections starts a warmup.
  5. If the player does not move, the teleport completes.
  6. If movement cancellation is enabled and the player moves, the teleport is cancelled.

Main Features

Teleportation can include:

Feature Description
Warmup Adds a delay before teleporting.
Movement cancellation Cancels teleport if the player moves during warmup.
Optional cost Charges money for teleporting if economy is enabled.
Cooldown Prevents repeated teleport spam if configured.
Protection-based locations Teleports players to their protection location or saved home point.

Configuration

Teleportation settings are usually configured in:

plugins/LederProtections/config.yml

Example configuration:

teleport:
  enabled: true
  warmup-seconds: 3
  cancel-on-move: true

The exact structure may depend on your generated config.yml.


Common Teleport Options

Option Description
teleport.enabled Enables or disables protection teleportation.
teleport.warmup-seconds Time the player must wait before teleporting.
teleport.cancel-on-move Cancels the teleport if the player moves during warmup.
teleport.cost Optional money cost for teleporting.

Warmup

Warmup is the waiting time before the teleport happens.

Example:

teleport:
  warmup-seconds: 3

With this setting, the player must wait 3 seconds before teleporting.

Warmup is useful because it prevents teleport abuse during combat, escaping or dangerous situations.


Movement Cancellation

Movement cancellation stops the teleport if the player moves during warmup.

Example:

teleport:
  cancel-on-move: true

Expected behavior:

Situation Result
Player waits without moving Teleport completes.
Player moves during warmup Teleport is cancelled.
Player is pushed or displaced Teleport may be cancelled depending on movement detection.

This is recommended for survival servers.


Teleport Cost

Teleportation can optionally cost money.

Economy-based teleport costs require:

  • Vault;
  • a compatible economy plugin;
  • economy support enabled;
  • enough player balance.

Example:

teleport:
  cost: 100.0

If the cost is 0 or disabled, teleportation can be free.


Cost Safety

Teleport costs should only be charged when the teleport succeeds.

Expected behavior:

Situation Expected behavior
Teleport completes Cost is charged if configured.
Teleport is cancelled by movement Cost is not charged.
Player has insufficient money Teleport is denied.
Vault is missing Paid teleport should not be available.
Economy withdrawal fails Teleport should not report success.

Permissions

Teleportation may require permissions.

Common related permissions:

lederprotections.use
lederprotections.sethome

Depending on configuration, additional permissions may be required for teleport features.

Recommended player permissions:

lederprotections.use
lederprotections.sethome

Setting a Teleport Location

Depending on configuration, players may be able to set a teleport location for their protections.

This is useful when the protection stone is not located at the safest or most convenient teleport point.

Typical use cases:

Use case Description
Base entrance Set teleport to the main door.
Underground base Set teleport to a safe room.
Farm protection Set teleport near the farm access path.
Shop area Set teleport near the public entrance.

Only owners or allowed roles should be able to set teleport locations.


Teleport Destination

The teleport destination may be:

Destination type Description
Protection stone location Teleports to or near the protection stone.
Saved home point Teleports to a custom saved location.
Safe adjusted location Teleports to a location adjusted to avoid unsafe placement.

The exact behavior depends on configuration and plugin implementation.


Safety Recommendations

Recommended teleport settings for survival servers:

teleport:
  enabled: true
  warmup-seconds: 3
  cancel-on-move: true

For economy servers, you may use a small cost:

teleport:
  enabled: true
  warmup-seconds: 3
  cancel-on-move: true
  cost: 100.0

Recommended Tests

After changing teleport settings, test:

Test Expected result
Teleport without moving Teleport completes.
Move during warmup Teleport is cancelled.
Teleport with enough money Teleport completes and cost is charged.
Teleport without enough money Teleport is denied.
Teleport with Vault disabled Paid teleport is unavailable or free depending on config.
Teleport after server restart Saved destination still works.
Teleport to removed protection Teleport is denied safely.

Economy Tests

If teleport cost is enabled, test:

  1. Give yourself enough money.
  2. Teleport to a protection.
  3. Confirm the money is charged.
  4. Try teleporting without enough money.
  5. Confirm the teleport is denied.
  6. Start teleporting and move during warmup.
  7. Confirm the teleport is cancelled.
  8. Confirm money is not charged after cancellation.

Common Issues

Teleport does not start

Check that:

  • teleportation is enabled;
  • the player has permission;
  • the protection exists;
  • the player has access to the protection;
  • there are no console errors.

Teleport cancels immediately

Check that:

  • movement cancellation is enabled;
  • the player is not moving during warmup;
  • another plugin is not moving the player;
  • the server is not applying knockback or velocity at the same time.

Player is charged but teleport does not happen

This should not happen.

Check:

  • console errors;
  • Vault and economy plugin behavior;
  • movement cancellation;
  • teleport destination safety;
  • whether the server is using the latest LederProtections version.

Report the issue with reproduction steps if it happens.


Player is not charged

Check that:

  • teleport cost is enabled;
  • Vault is installed;
  • an economy plugin is installed;
  • the player has enough money;
  • the cost is greater than 0.

Teleport destination is unsafe

Check that:

  • the protection has a valid teleport location;
  • the saved teleport point is not inside blocks;
  • the area is loaded correctly;
  • the protection still exists.

If needed, reset the teleport location to a safer place.


Best Practices

Recommended practices:

  • Use a short warmup, such as 3 seconds.
  • Enable movement cancellation.
  • Keep teleport costs reasonable.
  • Test teleport after changing economy settings.
  • Test teleport after changing protection settings.
  • Avoid setting teleport locations in unsafe blocks.
  • Do not charge money if teleport is cancelled.
  • Use /lep check if protection data seems inconsistent.

Recommended Next Pages

/p home in 1.5.0

Use /p home casa, /p home Casa del lago or /p home <protection ID>. The target must be owned by you or shared with you as co-owner/member. Colors and case do not affect name matching; duplicate names require the ID. Tab completion only suggests accessible protections. /p sethome defines the destination. Warmup, cost, cooldown and safe-location checks still apply. Access is checked again before teleporting, including after the warmup. No separate home storage is created.

En español: /p home casa usa el nombre o ID de una protección a la que tienes acceso. No crea un sistema de homes independiente; /p sethome fija el destino.

For the complete teleport/economy schema, use Configuration Files rather than copying partial examples.

Clone this wiki locally