/// <summary> /// Disconnects the target player from this server with a provided message. /// </summary> public static void DisconnectPlayerWithMessage(NetworkPlayer player, string message) { if (Network.isServer) { RPCHooks.DisconnectWithMessage(player, message); } else { throw new InvalidOperationException("Only the server may disconnect other players!"); } }