Fix NPE during server initialization from server list pings

This commit is contained in:
Shane Freeder
2019-02-06 19:15:46 +00:00
parent d601e3dc2f
commit 9bca846f08
2 changed files with 5 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ and allows full control of the response sent to the client.
diff --git a/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java
new file mode 100644
index 00000000..dd1deafd
index 00000000..b2a8476c
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java
@@ -0,0 +0,0 @@
@@ -185,7 +185,8 @@ index 00000000..dd1deafd
+ * Returns the protocol version that will be sent as the protocol version
+ * of the server to the client.
+ *
+ * @return The protocol version of the server
+ * @return The protocol version of the server, or {@code -1} if the server
+ * has not finished initialization yet
+ */
+ public int getProtocolVersion() {
+ return protocolVersion;