diff --git a/CraftBukkit-Patches/0024-Enable-Improved-Ping-Sending.patch b/CraftBukkit-Patches/0024-Enable-Improved-Ping-Sending.patch index a44cb52ae..34667da29 100644 --- a/CraftBukkit-Patches/0024-Enable-Improved-Ping-Sending.patch +++ b/CraftBukkit-Patches/0024-Enable-Improved-Ping-Sending.patch @@ -1,4 +1,4 @@ -From 92495f9ed485c619523e3d5e4be1d122b590e6a3 Mon Sep 17 00:00:00 2001 +From dbc277885ec999d8e9ea208555b85b0e4baa34c1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Feb 2013 20:45:20 +1100 Subject: [PATCH] Enable Improved Ping Sending @@ -17,7 +17,7 @@ index 8d98a70..4c06a42 100644 public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 5b0590e..8b3d757 100644 +index 5b0590e..273439a 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -779,6 +779,25 @@ public abstract class PlayerList { @@ -27,7 +27,7 @@ index 5b0590e..8b3d757 100644 + // Spigot start + if ( !players.isEmpty() ) + { -+ int index = MinecraftServer.currentTick % this.players.size(); ++ int index = Math.abs( MinecraftServer.currentTick ) % this.players.size(); + EntityPlayer player = (EntityPlayer) this.players.get( index ); + if ( player.lastPing == -1 || Math.abs( player.ping - player.lastPing ) > 20 ) + { @@ -47,5 +47,5 @@ index 5b0590e..8b3d757 100644 public void sendAll(Packet packet) { -- -1.8.3.2 +1.8.5.2.msysgit.0