2019-06-14 04:27:40 +02:00
|
|
|
From 546e453739bd983de0706baf4ec72ac2665ba7d9 Mon Sep 17 00:00:00 2001
|
2018-03-30 19:00:01 +02:00
|
|
|
From: Minecrell <minecrell@minecrell.net>
|
|
|
|
Date: Wed, 11 Oct 2017 19:30:20 +0200
|
|
|
|
Subject: [PATCH] Add legacy ping support to PaperServerListPingEvent
|
|
|
|
|
|
|
|
Add a new method to StatusClient check if the client is a legacy
|
|
|
|
client that does not support all of the features provided in the
|
|
|
|
event.
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/network/StatusClient.java b/src/main/java/com/destroystokyo/paper/network/StatusClient.java
|
2019-06-06 17:36:57 +02:00
|
|
|
index 517d15238..ffda9f6a8 100644
|
2018-03-30 19:00:01 +02:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/network/StatusClient.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/network/StatusClient.java
|
|
|
|
@@ -10,4 +10,16 @@ import com.destroystokyo.paper.event.server.PaperServerListPingEvent;
|
|
|
|
*/
|
|
|
|
public interface StatusClient extends NetworkClient {
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Returns whether the client is using an older version that doesn't
|
|
|
|
+ * support all of the features in {@link PaperServerListPingEvent}.
|
|
|
|
+ *
|
|
|
|
+ * <p>For Vanilla, this returns {@code true} for all clients older than 1.7.</p>
|
|
|
|
+ *
|
|
|
|
+ * @return {@code true} if the client is using legacy ping
|
|
|
|
+ */
|
|
|
|
+ default boolean isLegacy() {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
}
|
|
|
|
--
|
2019-04-23 06:47:07 +02:00
|
|
|
2.21.0
|
2018-03-30 19:00:01 +02:00
|
|
|
|