mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 10:44:39 +01:00
Always use real player count for displayed online players.
By: md_5 <git@md-5.net>
This commit is contained in:
parent
a6172c3083
commit
d0795c8248
1 changed files with 11 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
From 331f61fc74453d744df31d52edf5c9b804fb9597 Mon Sep 17 00:00:00 2001
|
From f39f990d2c3c43cad0ac0571c9802c2b2eed5301 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Sun, 26 Jan 2014 12:13:31 +1100
|
Date: Sun, 26 Jan 2014 12:13:31 +1100
|
||||||
Subject: [PATCH] Fix Ping Player Sample
|
Subject: [PATCH] Fix Ping Player Sample
|
||||||
|
@ -44,7 +44,7 @@ index 022e032..9c602b4 100644
|
||||||
|
|
||||||
if ((this.autosavePeriod > 0) && ((this.ticks % this.autosavePeriod) == 0)) { // CraftBukkit
|
if ((this.autosavePeriod > 0) && ((this.ticks % this.autosavePeriod) == 0)) { // CraftBukkit
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java
|
diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java
|
||||||
index 7903c43..8203fbd 100644
|
index 7903c43..6480971 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketStatusListener.java
|
--- a/src/main/java/net/minecraft/server/PacketStatusListener.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketStatusListener.java
|
+++ b/src/main/java/net/minecraft/server/PacketStatusListener.java
|
||||||
@@ -35,7 +35,7 @@ public class PacketStatusListener implements PacketStatusInListener {
|
@@ -35,7 +35,7 @@ public class PacketStatusListener implements PacketStatusInListener {
|
||||||
|
@ -56,6 +56,15 @@ index 7903c43..8203fbd 100644
|
||||||
class ServerListPingEvent extends org.bukkit.event.server.ServerListPingEvent {
|
class ServerListPingEvent extends org.bukkit.event.server.ServerListPingEvent {
|
||||||
CraftIconCache icon = minecraftServer.server.getServerIcon();
|
CraftIconCache icon = minecraftServer.server.getServerIcon();
|
||||||
|
|
||||||
|
@@ -109,7 +109,7 @@ public class PacketStatusListener implements PacketStatusInListener {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- ServerPingPlayerSample playerSample = new ServerPingPlayerSample(event.getMaxPlayers(), profiles.size());
|
||||||
|
+ ServerPingPlayerSample playerSample = new ServerPingPlayerSample(event.getMaxPlayers(), minecraftServer.getPlayerList().getPlayerCount()); // Spigot - always use real player count
|
||||||
|
playerSample.a(profiles.toArray(new GameProfile[profiles.size()]));
|
||||||
|
|
||||||
|
ServerPing ping = new ServerPing();
|
||||||
--
|
--
|
||||||
1.8.3.2
|
1.8.3.2
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue