Use tab list name to prevent duplicates.
This commit is contained in:
parent
c83471b860
commit
e942bf6641
|
@ -1,16 +1,16 @@
|
|||
From a35bce420da3b31fae130a22fb4f7c39df9a6cae Mon Sep 17 00:00:00 2001
|
||||
From e7125d3278b8ad21a2cac6f397ba835c5a76b41d Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 16 Feb 2013 19:05:15 +1100
|
||||
Subject: [PATCH] Infrequently send tab list updates.
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/PlayerList.java | 4 +---
|
||||
src/main/java/net/minecraft/server/PlayerList.java | 6 ++----
|
||||
src/main/java/org/bukkit/craftbukkit/Spigot.java | 2 ++
|
||||
src/main/resources/configurations/bukkit.yml | 1 +
|
||||
3 files changed, 4 insertions(+), 3 deletions(-)
|
||||
3 files changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index d13fa19..aeb2368 100644
|
||||
index d13fa19..8d07a76 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -655,13 +655,11 @@ public abstract class PlayerList {
|
||||
|
@ -22,17 +22,18 @@ index d13fa19..aeb2368 100644
|
|||
+ 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));
|
||||
- this.sendAll(new Packet201PlayerInfo(entityplayer.name, true, entityplayer.ping));
|
||||
+ this.sendAll(new Packet201PlayerInfo(entityplayer.listName, true, entityplayer.ping));
|
||||
}
|
||||
- // CraftBukkit end */
|
||||
}
|
||||
|
||||
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
|
||||
index 75572f9..a514471 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;
|
||||
@@ -7,6 +7,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import java.util.List;
|
||||
|
||||
public class Spigot {
|
||||
|
@ -40,7 +41,7 @@ index 04f8f56..709a4f0 100644
|
|||
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 {
|
||||
@@ -41,6 +42,7 @@ public class Spigot {
|
||||
server.chunkGCPeriod = 600;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue