Skip to content

Commit

Permalink
Update 1.21 implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerS1066 committed Aug 25, 2024
1 parent 952435a commit ceb10e1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@

import io.papermc.paper.entity.TeleportFlag;
import net.countercraft.movecraft.SmoothTeleport;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

public class ISmoothTeleport extends SmoothTeleport {
public void teleport(@NotNull Player player, @NotNull Location location) {
Bukkit.getServer().getLogger().info("Teleporting " + player.getName() + " to " + location);
player.teleport(
location,
TeleportFlag.Relative.X,
TeleportFlag.Relative.Y,
TeleportFlag.Relative.Z,
TeleportFlag.Relative.PITCH,
TeleportFlag.Relative.YAW
TeleportFlag.Relative.YAW,
TeleportFlag.EntityState.RETAIN_OPEN_INVENTORY,
TeleportFlag.EntityState.RETAIN_VEHICLE,
TeleportFlag.EntityState.RETAIN_PASSENGERS
);
}
}

0 comments on commit ceb10e1

Please sign in to comment.