diff --git a/Spigot-Server-Patches/Optimize-Navigation-Listener.patch b/Spigot-Server-Patches/Optimize-Navigation-Listener.patch index fe00ff7fc7..4547752bcc 100644 --- a/Spigot-Server-Patches/Optimize-Navigation-Listener.patch +++ b/Spigot-Server-Patches/Optimize-Navigation-Listener.patch @@ -67,6 +67,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - // NavigationAbstract navigationabstract = anavigationabstract1[k]; - // Spigot end + // Paper start ++ // DO NOT USE AN ITERATOR! This must be a for (;;) to avoid CME. ++ // This is perfectly safe, as additions are ok to be done in this iteration ++ // And Removals are queued instead of immediate. + for (int k = 0; k < this.navigators.size(); ++k) { + NavigationAbstract navigationabstract = this.navigators.get(k); + // Paper end