Skip to content

Commit

Permalink
Fixed Folia teleportation not using adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelli committed Jul 14, 2023
1 parent c7cf035 commit f32a3e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/net/coreprotect/utility/Teleport.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
import java.util.HashSet;
import java.util.Set;

import net.coreprotect.config.ConfigHandler;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;

import net.coreprotect.config.ConfigHandler;
import net.coreprotect.language.Phrase;
import net.coreprotect.model.BlockGroup;
import net.coreprotect.paper.PaperAdapter;

public class Teleport {

Expand Down Expand Up @@ -80,8 +81,9 @@ public static void performSafeTeleport(Player player, Location location, boolean
double oldY = location.getY();
location.setY(checkY);
if (ConfigHandler.isFolia) {
player.teleportAsync(location);
} else {
PaperAdapter.ADAPTER.teleportAsync(player, location);
}
else {
player.teleport(location);
}

Expand Down

0 comments on commit f32a3e7

Please sign in to comment.