mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
Fix PaperServerListPingEvent#getPlayerSample not being populated or used (#11387)
This commit is contained in:
parent
d503cbe01f
commit
0b7b70d405
1 changed files with 8 additions and 0 deletions
|
@ -66,6 +66,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@
|
||||
+package com.destroystokyo.paper.network;
|
||||
+
|
||||
+import com.destroystokyo.paper.profile.PlayerProfile;
|
||||
+import com.mojang.authlib.GameProfile;
|
||||
+import io.papermc.paper.adventure.AdventureComponent;
|
||||
+import java.util.ArrayList;
|
||||
|
@ -79,6 +80,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+import net.minecraft.network.protocol.status.ServerStatus;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import org.bukkit.craftbukkit.util.CraftIconCache;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+public final class StandardPaperServerListPingEventImpl extends PaperServerListPingEventImpl {
|
||||
+
|
||||
|
@ -104,6 +106,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ return sample;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull List<PlayerProfile> getPlayerSample() {
|
||||
+ this.getListedPlayers(); // Populate the backing list for the transforming view, and null out originalSample (see getListedPlayers and processRequest)
|
||||
+ return super.getPlayerSample();
|
||||
+ }
|
||||
+
|
||||
+ private List<GameProfile> getPlayerSampleHandle() {
|
||||
+ if (this.originalSample != null) {
|
||||
+ return this.originalSample;
|
||||
|
|
Loading…
Reference in a new issue