CoreProtect

CoreProtect

1M Downloads

Folia issue: Cannot teleport player, throw error on console

sofianedjerbi opened this issue ยท 0 comments

commented

We should teleport with Entity#teleportAsync only on Folia. Entity#teleport isn't supported.
Documentation

[02:33:29 WARN]: java.lang.UnsupportedOperationException: Must use teleportAsync while in region threading
[02:33:29 WARN]:        at org.bukkit.craftbukkit.v1_19_R3.entity.CraftPlayer.teleport(CraftPlayer.java:1264)
[02:33:29 WARN]:        at org.bukkit.craftbukkit.v1_19_R3.entity.CraftPlayer.teleport(CraftPlayer.java:1213)
[02:33:29 WARN]:        at org.bukkit.craftbukkit.v1_19_R3.entity.CraftEntity.teleport(CraftEntity.java:569)
[02:33:29 WARN]:        at CoreProtect-21.3.jar//net.coreprotect.utility.Teleport.performSafeTeleport(Teleport.java:81)
[02:33:29 WARN]:        at CoreProtect-21.3.jar//net.coreprotect.command.TeleportCommand.runCommand(TeleportCommand.java:107)
[02:33:29 WARN]:        at CoreProtect-21.3.jar//net.coreprotect.command.CommandHandler.onCommand(CommandHandler.java:1232)
[02:33:29 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[02:33:29 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155)
[02:33:29 WARN]:        at org.bukkit.craftbukkit.v1_19_R3.CraftServer.dispatchCommand(CraftServer.java:1017)
[02:33:29 WARN]:        at org.bukkit.craftbukkit.v1_19_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64)
[02:33:29 WARN]:        at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264)
[02:33:29 WARN]:        at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:322)
[02:33:29 WARN]:        at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:306)
[02:33:29 WARN]:        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2310)
[02:33:29 WARN]:        at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$16(PlayerConnection.java:2270)
[02:33:29 WARN]:        at io.papermc.paper.threadedregions.EntityScheduler.executeTick(EntityScheduler.java:173)
[02:33:29 WARN]:        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1533)
[02:33:29 WARN]:        at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:316)
[02:33:29 WARN]:        at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:383)
[02:33:29 WARN]:        at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:525)
[02:33:29 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1589)