Fixed Folia teleportation not using adapter

This commit is contained in:
Intelli 2023-07-13 19:27:53 -06:00
parent c7cf035564
commit f32a3e7c5e

View file

@ -4,15 +4,16 @@ import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import net.coreprotect.config.ConfigHandler;
import org.bukkit.GameMode; import org.bukkit.GameMode;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import net.coreprotect.config.ConfigHandler;
import net.coreprotect.language.Phrase; import net.coreprotect.language.Phrase;
import net.coreprotect.model.BlockGroup; import net.coreprotect.model.BlockGroup;
import net.coreprotect.paper.PaperAdapter;
public class Teleport { public class Teleport {
@ -80,8 +81,9 @@ public class Teleport {
double oldY = location.getY(); double oldY = location.getY();
location.setY(checkY); location.setY(checkY);
if (ConfigHandler.isFolia) { if (ConfigHandler.isFolia) {
player.teleportAsync(location); PaperAdapter.ADAPTER.teleportAsync(player, location);
} else { }
else {
player.teleport(location); player.teleport(location);
} }