From fe5da3cf90d353517978c98ac6caa2ddefd8a16f Mon Sep 17 00:00:00 2001 From: Sardelka Date: Mon, 1 Aug 2022 07:14:24 +0800 Subject: [PATCH] Check --- RageCoop.Client/Scripting/API.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RageCoop.Client/Scripting/API.cs b/RageCoop.Client/Scripting/API.cs index 3e4a67c..97a7bbd 100644 --- a/RageCoop.Client/Scripting/API.cs +++ b/RageCoop.Client/Scripting/API.cs @@ -173,7 +173,7 @@ namespace RageCoop.Client.Scripting /// /// Get an that the player is currently connected to, or null if not connected to the server /// - public static System.Net.IPEndPoint ServerEndPoint { get { return Networking.Client?.ServerConnection.RemoteEndPoint; } } + public static System.Net.IPEndPoint ServerEndPoint { get { return Networking.IsOnServer ? Networking.Client?.ServerConnection.RemoteEndPoint : null; } } /// /// Check if a RAGECOOP menu is visible