Trying to fix remove from water lag

This commit is contained in:
Fabrizio La Rosa 2020-07-02 06:14:24 +02:00
parent 45a00b1eef
commit cf5bc5a12c

View File

@ -111,8 +111,10 @@ public class TeleportCommand extends SubCommand {
Bukkit.getServer().getScheduler().runTask(skyblock, () -> {
Location loc = island.getLocation(IslandWorld.Normal, IslandEnvironment.Main);
LocationUtil.removeWaterFromLoc(skyblock, loc);
PaperLib.teleportAsync(player, loc);
PaperLib.getChunkAtAsync(loc).thenRun((() -> {
LocationUtil.removeWaterFromLoc(skyblock, loc);
PaperLib.teleportAsync(player, loc);
}));
if(!configLoad.getBoolean("Island.Teleport.FallDamage", true)){
player.setFallDistance(0.0F);