From b06bd45d475b489ba1c35d7102aabf92872d9006 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 24 Nov 2021 07:30:57 +1100 Subject: [PATCH] Add docs in ServerListPingEvent based on changes from 1.18 By: Doc --- .../java/org/bukkit/event/server/ServerListPingEvent.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/event/server/ServerListPingEvent.java b/paper-api/src/main/java/org/bukkit/event/server/ServerListPingEvent.java index 7a2a58bac8..cc5e2fef75 100644 --- a/paper-api/src/main/java/org/bukkit/event/server/ServerListPingEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/server/ServerListPingEvent.java @@ -3,6 +3,7 @@ package org.bukkit.event.server; import java.net.InetAddress; import java.util.Iterator; import org.apache.commons.lang.Validate; +import org.bukkit.Bukkit; import org.bukkit.UndefinedNullability; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; @@ -12,6 +13,9 @@ import org.jetbrains.annotations.NotNull; /** * Called when a server list ping is coming in. Displayed players can be * checked and removed by {@link #iterator() iterating} over this event. + *
+ * Note: The players in {@link #iterator()} will not be shown in the + * server info if {@link Bukkit#getHideOnlinePlayers()} is true. */ public class ServerListPingEvent extends ServerEvent implements Iterable { private static final int MAGIC_PLAYER_COUNT = Integer.MIN_VALUE; @@ -142,6 +146,9 @@ public class ServerListPingEvent extends ServerEvent implements Iterable * player to not be displayed on the player list, decrease the size * returned by {@link #getNumPlayers()}, and will not be returned again by * any new iterator. + *
+ * Note: The players here will not be shown in the server info if + * {@link Bukkit#getHideOnlinePlayers()} is true. * * @throws UnsupportedOperationException if the caller of this event does * not support removing players