Use vanilla method - just with toggle
This commit is contained in:
parent
ecf56eb38f
commit
60b7ce9918
@ -1,33 +1,33 @@
|
||||
From 6343d48ad9e86d2f069242a8a96ee4fcf988fc3d Mon Sep 17 00:00:00 2001
|
||||
From a35bce420da3b31fae130a22fb4f7c39df9a6cae Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 16 Feb 2013 17:56:26 +1100
|
||||
Date: Sat, 16 Feb 2013 19:05:15 +1100
|
||||
Subject: [PATCH] Infrequently send tab list updates.
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/PlayerList.java | 6 +++++-
|
||||
src/main/java/net/minecraft/server/PlayerList.java | 4 +---
|
||||
src/main/java/org/bukkit/craftbukkit/Spigot.java | 2 ++
|
||||
src/main/resources/configurations/bukkit.yml | 1 +
|
||||
3 files changed, 8 insertions(+), 1 deletion(-)
|
||||
3 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index d13fa19..aaf447a 100644
|
||||
index d13fa19..aeb2368 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -651,9 +651,13 @@ public abstract class PlayerList {
|
||||
@@ -655,13 +655,11 @@ public abstract class PlayerList {
|
||||
this.o = 0;
|
||||
}
|
||||
|
||||
- /* CraftBukkit start - remove updating of lag to players -- it spams way to much on big servers.
|
||||
- if (this.o < this.players.size()) {
|
||||
+ if (org.bukkit.craftbukkit.Spigot.tabPing && this.o < this.players.size()) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) this.players.get(this.o);
|
||||
|
||||
this.sendAll(new Packet201PlayerInfo(entityplayer.name, true, entityplayer.ping));
|
||||
}
|
||||
- // CraftBukkit end */
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
- if (++this.o > 600) {
|
||||
+ // Spigot start
|
||||
+ if (++this.o > 600 && org.bukkit.craftbukkit.Spigot.tabPing) {
|
||||
this.o = 0;
|
||||
+ EntityPlayer entityplayer = (EntityPlayer) this.players.get(this.o);
|
||||
+ this.sendAll(new Packet201PlayerInfo(entityplayer.name, true, entityplayer.ping));
|
||||
}
|
||||
+ // Spigot end
|
||||
|
||||
/* CraftBukkit start - remove updating of lag to players -- it spams way to much on big servers.
|
||||
if (this.o < this.players.size()) {
|
||||
public void sendAll(Packet packet) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
index 04f8f56..709a4f0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
|
Loading…
Reference in New Issue
Block a user