More 1.14 patches
This commit is contained in:
@@ -6,7 +6,7 @@ Subject: [PATCH] Implement extended PaperServerListPingEvent
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java
|
||||
new file mode 100644
|
||||
index 0000000000..c1a8e295b6
|
||||
index 000000000..c1a8e295b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -43,7 +43,7 @@ index 0000000000..c1a8e295b6
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java
|
||||
new file mode 100644
|
||||
index 0000000000..a2a409e635
|
||||
index 000000000..a2a409e63
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -60,7 +60,7 @@ index 0000000000..a2a409e635
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java
|
||||
new file mode 100644
|
||||
index 0000000000..a85466bc7e
|
||||
index 000000000..a85466bc7
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -177,7 +177,7 @@ index 0000000000..a85466bc7e
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 5517c5fe81..476a729ddf 100644
|
||||
index 27d0d818b..359ce72fc 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -188,17 +188,17 @@ index 5517c5fe81..476a729ddf 100644
|
||||
import com.google.common.base.Stopwatch;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
if (i - this.Y >= 5000000000L) {
|
||||
this.Y = i;
|
||||
this.m.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.getMaxPlayers(), this.getPlayerCount()));
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
if (i - this.Z >= 5000000000L) {
|
||||
this.Z = i;
|
||||
this.serverPing.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.getMaxPlayers(), this.getPlayerCount()));
|
||||
- GameProfile[] agameprofile = new GameProfile[Math.min(this.getPlayerCount(), 12)];
|
||||
+ GameProfile[] agameprofile = new GameProfile[Math.min(this.getPlayerCount(), org.spigotmc.SpigotConfig.playerSample)]; // Paper
|
||||
int j = MathHelper.nextInt(this.n, 0, this.getPlayerCount() - agameprofile.length);
|
||||
int j = MathHelper.nextInt(this.q, 0, this.getPlayerCount() - agameprofile.length);
|
||||
|
||||
for (int k = 0; k < agameprofile.length; ++k) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java
|
||||
index c9edd289ac..8aa121e2f7 100644
|
||||
index b247a18b9..ba1c76c1a 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketStatusListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketStatusListener.java
|
||||
@@ -0,0 +0,0 @@ public class PacketStatusListener implements PacketStatusInListener {
|
||||
@@ -221,7 +221,7 @@ index c9edd289ac..8aa121e2f7 100644
|
||||
// CraftBukkit end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
|
||||
index aa125a52dc..ea52e89bd9 100644
|
||||
index aa125a52d..ea52e89bd 100644
|
||||
--- a/src/main/java/net/minecraft/server/ServerPing.java
|
||||
+++ b/src/main/java/net/minecraft/server/ServerPing.java
|
||||
@@ -0,0 +0,0 @@ public class ServerPing {
|
||||
@@ -246,7 +246,7 @@ index aa125a52dc..ea52e89bd9 100644
|
||||
this.c = agameprofile;
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 56f135f244..9c442dee24 100644
|
||||
index 0d827815c..062a24c3c 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@@ -0,0 +0,0 @@ public class SpigotConfig
|
||||
@@ -254,7 +254,7 @@ index 56f135f244..9c442dee24 100644
|
||||
private static void playerSample()
|
||||
{
|
||||
- playerSample = getInt( "settings.sample-count", 12 );
|
||||
+ playerSample = Math.max(getInt( "settings.sample-count", 12 ), 0); // Paper - Avoid negative counts
|
||||
+ playerSample = Math.max( getInt( "settings.sample-count", 12 ), 0 ); // Paper - Avoid negative counts
|
||||
Bukkit.getLogger().log( Level.INFO, "Server Ping Player Sample Count: {0}", playerSample ); // Paper - Use logger
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user