Fixed Folia teleportation not using adapter
This commit is contained in:
parent
c7cf035564
commit
f32a3e7c5e
1 changed files with 5 additions and 3 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue