Repository navigation
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.
Protection teleportation lets players teleport to a saved location inside or near one of their protections.
A typical flow:
- The player opens
/p. - The player selects one of their protections.
- The player chooses the teleport option.
- LederProtections starts a warmup.
- If the player does not move, the teleport completes.
- If movement cancellation is enabled and the player moves, the teleport is cancelled.
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. |
Teleportation settings are usually configured in:
plugins/LederProtections/config.yml
Example configuration:
teleport:
enabled: true
warmup-seconds: 3
cancel-on-move: trueThe exact structure may depend on your generated config.yml.
| 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 is the waiting time before the teleport happens.
Example:
teleport:
warmup-seconds: 3With 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 stops the teleport if the player moves during warmup.
Example:
teleport:
cancel-on-move: trueExpected 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.
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.0If the cost is 0 or disabled, teleportation can be free.
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. |
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
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.
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.
Recommended teleport settings for survival servers:
teleport:
enabled: true
warmup-seconds: 3
cancel-on-move: trueFor economy servers, you may use a small cost:
teleport:
enabled: true
warmup-seconds: 3
cancel-on-move: true
cost: 100.0After 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. |
If teleport cost is enabled, test:
- Give yourself enough money.
- Teleport to a protection.
- Confirm the money is charged.
- Try teleporting without enough money.
- Confirm the teleport is denied.
- Start teleporting and move during warmup.
- Confirm the teleport is cancelled.
- Confirm money is not charged after cancellation.
Check that:
- teleportation is enabled;
- the player has permission;
- the protection exists;
- the player has access to the protection;
- there are no console errors.
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.
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.
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.
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.
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 checkif protection data seems inconsistent.
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.