Add extended PaperServerListPingEvent
Add a new event that extends the original ServerListPingEvent and allows full control of the response sent to the client.
This commit is contained in:
@@ -248,9 +248,11 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
*
|
||||
* @throws UnsupportedOperationException if the caller of this event does
|
||||
* not support removing players
|
||||
* @deprecated the Iterable interface will be removed at some point
|
||||
*/
|
||||
@NotNull
|
||||
@Override
|
||||
@Deprecated(forRemoval = true, since = "1.20.6")
|
||||
public Iterator<Player> iterator() throws UnsupportedOperationException {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@@ -18,4 +18,9 @@ public interface CachedServerIcon {
|
||||
@Nullable
|
||||
public String getData(); // Paper
|
||||
|
||||
// Paper start
|
||||
default boolean isEmpty() {
|
||||
return getData() == null;
|
||||
}
|
||||
// Paper end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user