Fix NPE during server initialization from server list pings
This commit is contained in:
parent
e952f6ebe2
commit
182d4f528f
2 changed files with 9 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
From 49a9d5dd768670e0cf6bb85313727ad57bc8428e Mon Sep 17 00:00:00 2001
|
||||
From 4987254c0fc69b5f08d88f3dec52e37a6e68140d Mon Sep 17 00:00:00 2001
|
||||
From: Minecrell <minecrell@minecrell.net>
|
||||
Date: Wed, 11 Oct 2017 15:55:38 +0200
|
||||
Subject: [PATCH] Add extended PaperServerListPingEvent
|
||||
|
@ -8,10 +8,10 @@ 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 +1,319 @@
|
||||
@@ -0,0 +1,320 @@
|
||||
+package com.destroystokyo.paper.event.server;
|
||||
+
|
||||
+import static java.util.Objects.requireNonNull;
|
||||
|
@ -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;
|
||||
|
@ -366,5 +367,5 @@ index 04804706..44563482 100644
|
|||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.18.0
|
||||
2.20.1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue