Cleanup some ping passthrough stuff (#2726)

This commit is contained in:
Konicai 2021-12-22 23:05:56 -05:00 committed by GitHub
parent 4c409f98f3
commit 6cd8b3387c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 7 deletions

View file

@ -25,6 +25,7 @@
package org.geysermc.geyser.ping;
import javax.annotation.Nullable;
import java.net.Inet4Address;
import java.net.InetSocketAddress;
@ -38,6 +39,7 @@ public interface IGeyserPingPassthrough {
*
* @return string of the MOTD
*/
@Nullable
default GeyserPingInfo getPingInformation() {
return this.getPingInformation(new InetSocketAddress(Inet4Address.getLoopbackAddress(), 69));
}
@ -48,6 +50,7 @@ public interface IGeyserPingPassthrough {
* @param inetSocketAddress the ip address of the client pinging the server
* @return string of the MOTD
*/
@Nullable
GeyserPingInfo getPingInformation(InetSocketAddress inetSocketAddress);
}