2013-02-16 08:05:26 +00:00
|
|
|
From a35bce420da3b31fae130a22fb4f7c39df9a6cae Mon Sep 17 00:00:00 2001
|
2013-02-16 06:56:39 +00:00
|
|
|
From: md_5 <md_5@live.com.au>
|
2013-02-16 08:05:26 +00:00
|
|
|
Date: Sat, 16 Feb 2013 19:05:15 +1100
|
2013-02-16 06:56:39 +00:00
|
|
|
Subject: [PATCH] Infrequently send tab list updates.
|
|
|
|
|
|
|
|
---
|
2013-02-16 08:05:26 +00:00
|
|
|
src/main/java/net/minecraft/server/PlayerList.java | 4 +---
|
2013-02-16 06:56:39 +00:00
|
|
|
src/main/java/org/bukkit/craftbukkit/Spigot.java | 2 ++
|
|
|
|
src/main/resources/configurations/bukkit.yml | 1 +
|
2013-02-16 08:05:26 +00:00
|
|
|
3 files changed, 4 insertions(+), 3 deletions(-)
|
2013-02-16 06:56:39 +00:00
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
2013-02-16 08:05:26 +00:00
|
|
|
index d13fa19..aeb2368 100644
|
2013-02-16 06:56:39 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
2013-02-16 08:05:26 +00:00
|
|
|
@@ -655,13 +655,11 @@ public abstract class PlayerList {
|
2013-02-16 06:56:39 +00:00
|
|
|
this.o = 0;
|
|
|
|
}
|
|
|
|
|
2013-02-16 08:05:26 +00:00
|
|
|
- /* 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 sendAll(Packet packet) {
|
2013-02-16 06:56:39 +00:00
|
|
|
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
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
|
|
|
@@ -6,6 +6,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
public class Spigot {
|
|
|
|
+ public static boolean tabPing = false;
|
|
|
|
public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) {
|
|
|
|
commandMap.register("bukkit", new org.bukkit.craftbukkit.command.RestartCommand("restart"));
|
|
|
|
commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps"));
|
|
|
|
@@ -40,6 +41,7 @@ public class Spigot {
|
|
|
|
server.chunkGCPeriod = 600;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ tabPing = configuration.getBoolean("settings.tab-ping", tabPing);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
|
|
|
|
index 5933a88..8ddda07 100644
|
|
|
|
--- a/src/main/resources/configurations/bukkit.yml
|
|
|
|
+++ b/src/main/resources/configurations/bukkit.yml
|
|
|
|
@@ -35,6 +35,7 @@ settings:
|
|
|
|
spam-exclusions:
|
|
|
|
- /skill
|
|
|
|
map-send-interval: 10000
|
|
|
|
+ tab-ping: false
|
|
|
|
world-settings:
|
|
|
|
default:
|
|
|
|
growth-chunks-per-tick: 650
|
|
|
|
--
|
|
|
|
1.8.1-rc2
|
|
|
|
|