Transmition
Teleport the user ahead x amount of distance.
Overview
The Transmition
class provides a method for teleporting a player a specified distance in the direction they are facing within a Minecraft Bukkit server environment. This class offers a versatile tool for player movement and navigation.
Method
create
Teleports the specified player a certain distance in the direction they are facing.
Parameters
player
: The player to be teleported. This must be a valid BukkitPlayer
object.distance
: The distance (in blocks) to teleport the player. This value determines the extent of the teleportation.
Usage Example
Notes
This method calculates the destination based on the player's current location and facing direction.
Teleportation occurs along a straight line from the player's current position.
The method ensures that the destination location is safe by checking for obstructing blocks along the teleportation path.
Last updated