Class AbstractTeleporter

java.lang.Object
com.kamikazejam.kamicommon.nms.abstraction.teleport.AbstractTeleporter

public abstract class AbstractTeleporter extends Object
Abstract class providing version-specific implementations for player teleportation without triggering Bukkit events.

This abstraction allows for direct teleportation of players using NMS methods, bypassing the standard Bukkit teleportation system which fires events and performs additional checks. This can be useful for internal teleportation operations where events should not be triggered.

Warning: Using this class bypasses Bukkit's teleportation events and safety checks. Ensure that any necessary validation is performed manually when using these methods.

  • Constructor Details

    • AbstractTeleporter

      public AbstractTeleporter()
  • Method Details

    • teleportWithoutEvent

      public abstract void teleportWithoutEvent(Player player, Location location)
      Teleports a player to the specified location without triggering Bukkit events.

      This method performs a direct teleportation using NMS methods, completely bypassing Bukkit's event system. No PlayerTeleportEvent will be fired, and no plugins will be notified of the teleportation.

      This is useful for internal operations where you need to move a player without other plugins interfering or being notified of the movement.

      Parameters:
      player - the Player to teleport
      location - the target Location to teleport the player to