Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On Folia servers, you have to teleport using teleportAsync, otherwhise you get this error:
This happens when you use the spectate command
[13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] java.lang.UnsupportedOperationException: Must use teleportAsync while in region threading [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at org.bukkit.craftbukkit.entity.CraftPlayer.teleport(CraftPlayer.java:1408) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at org.bukkit.craftbukkit.entity.CraftPlayer.teleport(CraftPlayer.java:1377) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at org.bukkit.craftbukkit.entity.CraftEntity.teleport(CraftEntity.java:237) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at grimac-2.3.68.jar//ac.grim.grimac.manager.SpectateManager.disable(SpectateManager.java:64) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at grimac-2.3.68.jar//ac.grim.grimac.commands.GrimStopSpectating.onStopSpectate(GrimStopSpectating.java:29) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at java.base/java.lang.reflect.Method.invoke(Method.java:580) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at grimac-2.3.68.jar//ac.grim.grimac.shaded.acf.RegisteredCommand.invoke(RegisteredCommand.java:152) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at grimac-2.3.68.jar//ac.grim.grimac.shaded.acf.BaseCommand.executeCommand(BaseCommand.java:578) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at grimac-2.3.68.jar//ac.grim.grimac.shaded.acf.BaseCommand.execute(BaseCommand.java:513) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at grimac-2.3.68.jar//ac.grim.grimac.shaded.acf.RootCommand.execute(RootCommand.java:99) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at grimac-2.3.68.jar//ac.grim.grimac.shaded.acf.BukkitRootCommand.execute(BukkitRootCommand.java:84) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:82) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:30) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:13) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:105) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:435) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at net.minecraft.commands.Commands.performCommand(Commands.java:342) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at net.minecraft.commands.Commands.performCommand(Commands.java:332) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at net.minecraft.commands.Commands.performCommand(Commands.java:326) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2252) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$14(ServerGamePacketListenerImpl.java:2225) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$tryHandleChat$17(ServerGamePacketListenerImpl.java:2382) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at io.papermc.paper.threadedregions.EntityScheduler.executeTick(EntityScheduler.java:181) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1658) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546) [13:29:41] [Region Scheduler Thread #0/ERROR]: [GrimAC] [ACF] at java.base/java.lang.Thread.run(Thread.java:1575)
I have implemented this quick fix in this PR