3
0
KCauldronX/patches/net/minecraft/network/NetworkSystem.java.patch

30 lines
1.1 KiB
Diff
Raw Normal View History

2015-03-22 17:38:04 +00:00
--- ../src-base/minecraft/net/minecraft/network/NetworkSystem.java
+++ ../src-work/minecraft/net/minecraft/network/NetworkSystem.java
@@ -129,7 +129,10 @@
while (iterator.hasNext())
{
ChannelFuture channelfuture = (ChannelFuture)iterator.next();
- channelfuture.channel().close().syncUninterruptibly();
+ ChannelFuture close=channelfuture.channel().close();
+// if(channelfuture.channel().isOpen()){
+// close.syncUninterruptibly();
+// }
}
}
@@ -139,6 +142,14 @@
2015-03-22 17:38:04 +00:00
synchronized (this.networkManagers)
{
+ // Spigot Start
+ // This prevents players from 'gaming' the server, and strategically relogging to increase their position in the tick order
+ if (org.spigotmc.SpigotConfig.playerShuffle > 0 && MinecraftServer.currentTick % org.spigotmc.SpigotConfig.playerShuffle == 0)
+ {
+ Collections.shuffle(this.networkManagers);
+ }
+
+ // Spigot End
Iterator iterator = this.networkManagers.iterator();
while (iterator.hasNext())