⭐
StarAPI Documentation
  • ⭐API Information
    • ❔About Our API's
    • ⬇️Installing Our API
  • 🌟StarAPI (Spigot/Paper)
    • 📂Abilities
      • ⏳Transmition
      • 🤯Implosion
      • 🏹MultiShot
    • 📂Builders
      • 👕Armor Builder
      • 📊Bossbar Builder
      • ☄️Command Builder
      • ⚔️Item Builder
      • 🧟‍♂️Mob Builder
      • 💯Scoreboard Builder
      • 🔗Webhook Builder
      • 🔨Message Builder
      • 🏗️Actionbar Builder
    • 📂Files
      • 📃Create Files
      • 📁Create Folders
      • 📖Read Files
      • 🖊️Write Files
    • 📂Inventory Utilities
      • 💎Animated Items
      • 📖Book Content
      • 📔Book GUI
      • 🎞️Filler
      • 🪁Inventory Items
      • 📝Inventory Name
      • 💀Inventory Skulls
    • 📂Message Utilities
      • 🤖Auto Responses
      • 🎨Message Colors
    • 📂Recipes
      • ⚒️Crafting Recipes
      • 🧑‍🍳Furnace Recipes
    • 📂Timers
      • 🕙Active Timers
      • ❌Cancel Timers
      • 🕙Delayed Timers
      • 🕐Create Timers
    • 📂Misc
      • 💀Give Skulls
      • 📈Progress Bars
      • ⬛Block Placer
Powered by GitBook
On this page
  • Overview
  • Method
  • Parameters
  • Notes
  1. StarAPI (Spigot/Paper)
  2. Abilities

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

public static void create(Player player, double distance)

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 Bukkit Player object.

  • distance: The distance (in blocks) to teleport the player. This value determines the extent of the teleportation.

Usage Example

// Define the player to be teleported
Player player = ...

// Define the distance (in blocks) to teleport the player
double distance = 10.0;

// Perform the teleportation
Transmition.create(player, distance);

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.

PreviousAbilitiesNextImplosion

Last updated 1 year ago

🌟
📂
⏳