mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-11-24 12:16:36 +01:00
Fixed Folia teleportation not using adapter
This commit is contained in:
parent
c7cf035564
commit
f32a3e7c5e
@ -4,15 +4,16 @@ import java.util.Arrays;
|
||||
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 {
|
||||
|
||||
@ -80,8 +81,9 @@ public class Teleport {
|
||||
double oldY = location.getY();
|
||||
location.setY(checkY);
|
||||
if (ConfigHandler.isFolia) {
|
||||
player.teleportAsync(location);
|
||||
} else {
|
||||
PaperAdapter.ADAPTER.teleportAsync(player, location);
|
||||
}
|
||||
else {
|
||||
player.teleport(location);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user