[SPIGOT-1885] EnumClientCommand.PERFORM_RESPAWN causing lag in 1.9 Created: 11/Mar/16 Updated: 11/Mar/16 Resolved: 11/Mar/16 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Tom Hoogstra | Assignee: | Unassigned |
| Resolution: | Invalid | Votes: | 0 |
| Labels: | 1.9 | ||
| Description |
|
Ever since 1.9, I've noticed that forcing a player to respawn in a BukkitRunnable is using a lot more than it used to in 1.8. When its in a runnable: Code for above: new BukkitRunnable(){ @Override public void run() { PacketPlayInClientCommand packet = new PacketPlayInClientCommand(EnumClientCommand.PERFORM_RESPAWN); ((CraftPlayer) p).getHandle().playerConnection.a(packet); } }.runTaskLater(instance, 2); However, when you change it to an async runnable, it throws an error, but it still works and uses an unnoticeable amount of usage. http://timings.aikar.co/?url=15349395 Quite the difference compared to a regular runnable The error I get is what I assume to be just from executing a packet async, but ill post it anyway: org.apache.commons.lang.UnhandledException: Plugin Clans v2.0 generated an exception while executing task 274 at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: net.minecraft.server.v1_9_R1.CancelledPacketHandleException |
| Comments |
| Comment by md_5 [ 11/Mar/16 ] |
|
We can't support NMS code. |