Skip to content

Commit

Permalink
fix folia error
Browse files Browse the repository at this point in the history
  • Loading branch information
ManInMyVan committed Nov 12, 2024
1 parent 33766b1 commit 9028135
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static void resyncPositions(GrimPlayer player, int minBlockX, int mY, int

// Takes 0.15ms or so to complete. Not bad IMO. Unsure how I could improve this other than sending packets async.
// But that's on PacketEvents.
FoliaScheduler.getEntityScheduler().execute(player.bukkitPlayer, GrimAPI.INSTANCE.getPlugin(), () -> {
FoliaScheduler.getGlobalRegionScheduler().execute(GrimAPI.INSTANCE.getPlugin(), () -> {
boolean flat = PacketEvents.getAPI().getServerManager().getVersion().isNewerThanOrEquals(ServerVersion.V_1_13);

if (player.bukkitPlayer == null) return;
Expand Down Expand Up @@ -111,6 +111,6 @@ public static void resyncPositions(GrimPlayer player, int minBlockX, int mY, int
}
}
}
}, null, 0);
});
}
}

0 comments on commit 9028135

Please sign in to comment.