mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-11-25 12:25:37 +01:00
Fix Folia Teleportation (#349)
This commit is contained in:
parent
f706bcf38e
commit
f2934fd876
@ -4,6 +4,7 @@ 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;
|
||||
@ -78,7 +79,11 @@ public class Teleport {
|
||||
|
||||
double oldY = location.getY();
|
||||
location.setY(checkY);
|
||||
if (ConfigHandler.isFolia) {
|
||||
player.teleportAsync(location);
|
||||
} else {
|
||||
player.teleport(location);
|
||||
}
|
||||
|
||||
if (!enforceTeleport) {
|
||||
// Only send a message if the player was moved by at least 1 block
|
||||
|
Loading…
Reference in New Issue
Block a user