Fix Folia Teleportation (#349)
This commit is contained in:
parent
f706bcf38e
commit
f2934fd876
1 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
player.teleport(location);
|
||||
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…
Add table
Add a link
Reference in a new issue